VisuallyHidden Component
A component that hides content visually while keeping it accessible to screen readers.
- Maintains accessibility for screen readers
- Hides content visually but keeps it in the DOM
- Useful for providing context to assistive technologies
- Commonly used with icons and decorative elements
Installation
The VisuallyHidden component is part of our UI library. You can import it directly from the components directory.
Usage
Here is how to use the visually hidden component in your project.
React TSX
React TSX
Examples
Basic VisuallyHidden
This text is hidden visually
This text is visible
API Reference
VisuallyHidden
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | Additional CSS classes |
children | ReactNode | - | The content to be hidden visually |