Skip to content
v2.5.0
English
Русский
Documentation

VisuallyHidden

VisuallyHidden keeps content available to assistive technology while removing it from visual layout.

Root Props

PropTypeDefault
classNamestring—
Optional class name for the hidden element. Can be used to override or extend default visually hidden styles.
asChildboolean—
Renders the content using a child component instead of a native <div>. Useful for integrating into custom elements without extra wrappers.
childrenReactNode—
The content to be hidden visually but accessible via screen readers. Often used for labels, instructions, or announcements.
refRef<HTMLDivElement>—
Ref to the visually hidden DOM element. Useful for focus management or measurement in accessible workflows.

Child Parts

  • None. VisuallyHidden is a single exported primitive.

Types

  • VisuallyHiddenProps

State Model

  • VisuallyHidden has no internal state.
  • Meaning changes only when the hidden content changes.