@stratakit/bricks
Version:
Small, modular components for StrataKit
19 lines (18 loc) • 771 B
TypeScript
import type { BaseProps } from "@stratakit/foundations/secret-internals";
interface VisuallyHiddenProps extends BaseProps<"span"> {
}
/**
* A visually hidden element that is still accessible to screen readers and other assistive technology.
*
* This is useful when you want to provide a text alternative to a visual element (e.g. an icon or symbol).
*
* Example:
* ```tsx
* <span aria-hidden="true">⭐</span>
* <VisuallyHidden>Favorite</VisuallyHidden>
* ```
*
* **Note**: The `IconButton` component utilizes `VisuallyHidden` internally when the `label` prop is set.
*/
declare const VisuallyHidden: import("react").ForwardRefExoticComponent<VisuallyHiddenProps & import("react").RefAttributes<HTMLElement | HTMLSpanElement>>;
export default VisuallyHidden;