Visually Hidden
Props
| Name | Type | Default | Description |
|---|---|---|---|
as | string | Component | 'span' | Root HTML element or Vue component. Use div for a live region or block content. |
Slots
| Name | Description |
|---|---|
default | Content exposed to assistive technology while hidden visually. This slot is required. |
Template ref
The component exposes element with type HTMLElement | null. element points to the rendered root element.
Styling constraints
- The component ignores incoming
class. - The component ignores incoming
style. - External styles cannot replace the fixed hiding rules.
Native attributes
The root element receives:
aria-*attributes.role.id.data-*attributes.- Native event listeners.
Hidden content
Do not put interactive controls inside VisuallyHidden. The visual interface cannot show those controls.
To hide content from all users, use conditional rendering or the native hidden attribute.