VisuallyHidden API
- Component status:
-
stable
Import
Section titled “Import”import { VisuallyHidden } from "@stratakit/bricks";// ORimport VisuallyHidden from "@stratakit/bricks/VisuallyHidden";VisuallyHidden
Section titled “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.