Skip to content

VisuallyHidden API

import { VisuallyHidden } from "@stratakit/bricks";
// OR
import VisuallyHidden from "@stratakit/bricks/VisuallyHidden";
Base element: <span>

A visually hidden element that is still accessible to screen readers and other assistive technology.

This is useful when you want to provide a text alternative to a visual element (e.g. an icon or symbol).

Example:

<span aria-hidden="true">⭐</span>
<VisuallyHidden>Favorite</VisuallyHidden>

Note: The IconButton component utilizes VisuallyHidden internally when the label prop is set.