import * as React from "react"; import {cn} from "@/lib/utilities"; import styles from "./visually-hidden.module.css"; /** * Represents the configurable props for the {@link VisuallyHidden} component. * * @remarks * Extends native `` attributes so hidden assistive text can carry ARIA metadata, * testing hooks, and composed class overrides while remaining available to screen readers. */ interface VisuallyHiddenProps extends React.HTMLAttributes { /** * Content that is hidden visually but remains accessible to assistive technology. */ children: React.ReactNode; } /** * Hides content visually while keeping it accessible to screen readers. * * @remarks * **Rendering Context**: Server- and client-compatible presentational component. * * Renders a `` that uses the classic clipping technique to remove content from the * visual flow without removing it from the accessibility tree. Use it to provide labels * for icon-only controls, clarify status changes, or add extra context for assistive tech. * * @example * ```tsx * * ``` * * @see {@link https://www.w3.org/WAI/tutorials/forms/labels/#note-on-hiding-elements | W3C hiding elements guidance} */ const VisuallyHidden = React.forwardRef(({className, ...props}, ref) => ( )); VisuallyHidden.displayName = "VisuallyHidden"; export {VisuallyHidden}; export type {VisuallyHiddenProps};