Skip to content
nexubDesign System
v11.9.0

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';
View as Markdown

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

TSX
<VisuallyHidden>(opens in a new tab)</VisuallyHidden>

Examples

Label an icon

Props

Props
PropTypeDefaultDescription
childrenReactNode—The text to read out.
asChildboolean—Hide your own element instead of a <span>.

On iOS & Android