File: visually-hidden.md | Updated: 11/15/2025
ThemesThemes PrimitivesPrimitives IconsIcons ColorsColors
Documentation Case studies Blog
Search
/
Introduction Getting started Accessibility Releases
Styling Animation Composition Server-side rendering
Accordion
Alert Dialog
Aspect Ratio
Avatar
Checkbox
Collapsible
Context Menu
Dialog
Dropdown Menu
Form
Preview
Hover Card
Label
Menubar
Navigation Menu
One-Time Password Field
Preview
Password Toggle Field
Preview
Popover
Progress
Radio Group
Scroll Area
Select
Separator
Slider
Switch
Tabs
Toast
Toggle
Toggle Group
Toolbar
Tooltip
Accessible Icon Direction Provider Portal Slot Visually Hidden
Utilities
Hides content from the screen in an accessible way.
Visually hides content while preserving it for assistive technology.
Install the component from your command line.
npm install @radix-ui/react-visually-hidden
Import the component.
import { VisuallyHidden } from "radix-ui";
export default () => <VisuallyHidden.Root />;
Use the visually hidden primitive.
import { VisuallyHidden } from "radix-ui";
import { GearIcon } from "@radix-ui/react-icons";
export default () => (
<button>
<GearIcon />
<VisuallyHidden.Root>Settings</VisuallyHidden.Root>
</button>
);
Anything you put inside this component will be hidden from the screen but will be announced by screen readers.
| Prop | Type | Default |
| --- | --- | --- |
| asChild<br><br>Prop description | boolean | false |
This is useful in certain scenarios as an alternative to traditional labelling with aria-label or aria-labelledby.
PreviousSlot