Skip to content

VisuallyHidden

A11y helper — content visible to screen readers, hidden visually. Built on Reka UI's VisuallyHidden primitive. Use this to label icon-only buttons, supplement decorative imagery, or expose state changes for assistive tech.

bash
npm install @vuecs/elements
vue
<script setup lang="ts">
import { VCVisuallyHidden } from '@vuecs/elements';
</script>

<template>
    <button type="button">
        <span aria-hidden="true">×</span>
        <VCVisuallyHidden>Close dialog</VCVisuallyHidden>
    </button>
</template>

Props

PropTypeDefaultDescription
asstring'span'HTML tag to render.

Released under the Apache 2.0 License.