Components · Inline Primitives
Visually Hidden
StableAdded v0.0.1
Content for screen readers only: hidden on screen but still read out (Radix).
import { VisuallyHidden } from '@nexub/react';Usage
Use it for
Extra context a sighted user gets from layout, e.g. "(opens in a new tab)"
Use something else for
Naming an icon button: `IconButton` takes a `label`
Hiding content from everyone: use `hidden`
Playground
Props
<VisuallyHidden>(opens in a new tab)</VisuallyHidden>Examples
Label an icon
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | The text to read out. |
| asChild | boolean | — | Hide your own element instead of a <span>. |
On iOS & Android
Web only
Visually Hidden has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.