Visually hidden
Text for screen readers only.
Example
Total
<p>Total <focsd-visually-hidden>(including tax)</focsd-visually-hidden> €120</p>Usage
Import the module once, then use the tag like any HTML element. Every framework below renders the same element; see Frameworks for setup.
<script type="module"> import '@focsd-dev/components/focsd-visually-hidden.js';</script>
<focsd-visually-hidden>(including tax)</focsd-visually-hidden>import { VisuallyHidden } from '@focsd-dev/react';
export function Example() { return <VisuallyHidden>(including tax)</VisuallyHidden>;}<script setup>import '@focsd-dev/components/focsd-visually-hidden.js';</script>
<template> <focsd-visually-hidden>(including tax)</focsd-visually-hidden></template>// Add CUSTOM_ELEMENTS_SCHEMA to the component's schemas, then:import '@focsd-dev/components/focsd-visually-hidden.js';
// template<focsd-visually-hidden>(including tax)</focsd-visually-hidden><script> import '@focsd-dev/components/focsd-visually-hidden.js';</script>
<focsd-visually-hidden>(including tax)</focsd-visually-hidden>API
Slots
| Slot | Description |
|---|---|
(default) | Default content. |
Accessibility
- Hidden visually, still read. Becomes visible when focus is inside it.
Ask the docs
Hi, what are you building?
Ask about any component, theming, forms or frameworks. I answer with the right component, a snippet and a link to its docs.