# @askrjs/ui/visually-hidden

> Published API exports for @askrjs/ui/visually-hidden.

Source: [https://askrjs.com/docs/reference/api/ui/visually-hidden](https://askrjs.com/docs/reference/api/ui/visually-hidden)

Status: stable. Packages: @askrjs/ui/visually-hidden.

**Published packages are authoritative.** Examples may lag behind a published contract. When guidance differs, verify the exports and TypeScript declarations in your installed package, then file an issue.

## Exports

This entrypoint publishes 7 exports from the declarations shipped by @askrjs/ui.

### `VISUALLY_HIDDEN_A11Y_CONTRACT`

```ts
VISUALLY_HIDDEN_A11Y_CONTRACT: { readonly STRATEGY: "visually-hidden-but-screen-reader-visible"; readonly HOST_ELEMENT: "span"; }
```

Visually hidden content accessibility contract.

### `VisuallyHidden`

```ts
VisuallyHidden: { (props: VisuallyHiddenSpanProps): JSX.Element; (props: VisuallyHiddenAsChildProps): JSX.Element; }
```

Renders a part of `visually-hidden`.

Supports polymorphic rendering via `asChild`.

### `VisuallyHiddenA11yContract`

```ts
VisuallyHiddenA11yContract: typeof VISUALLY_HIDDEN_A11Y_CONTRACT
```

Type of the Visually Hidden A11y Contract object.

### `VisuallyHiddenAsChildProps`

```ts
VisuallyHiddenAsChildProps: VisuallyHiddenOwnProps & {
  asChild: true;
  children: JSXElement;
  ref?: Ref<Element>;
}
```

Props for the `asChild` (polymorphic) rendering of Visually Hidden.

- `asChild`: asChild: true;

- `children`: children: JSXElement;

- `ref`: ref?: Ref<Element>;

### `VisuallyHiddenOwnProps`

```ts
VisuallyHiddenOwnProps: {
  children?: unknown;
}
```

Own props for Visually Hidden, before merging with native element attributes.

- `children`: children?: unknown;

### `VisuallyHiddenProps`

```ts
VisuallyHiddenProps: VisuallyHiddenSpanProps | VisuallyHiddenAsChildProps
```

Props for Visually Hidden.

- `asChild`: asChild?: boolean | undefined;

- `children`: children?: unknown;

- `ref`: ref?: ((value: HTMLSpanElement | null) => void) | { current: HTMLSpanElement | null; } | ((value: Element | null) => void) | { current: Element | null; } | null | undefined;

### `VisuallyHiddenSpanProps`

```ts
VisuallyHiddenSpanProps: Omit<JSX.IntrinsicElements['span'], 'children' | 'ref'> & VisuallyHiddenOwnProps & {
  asChild?: false;
  ref?: Ref<HTMLSpanElement>;
}
```

Props for Visually Hidden Span.

- `asChild`: asChild?: false | undefined;

- `children`: children?: unknown;

- `ref`: ref?: Ref<HTMLSpanElement>;

## Documentation navigation

[Previous](https://askrjs.com/docs/reference/api/ui/toggle-group/index.md) | [Next](https://askrjs.com/docs/reference/api/ui/accordion/index.md)
