UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

23 lines (22 loc) 825 B
import React, { HTMLAttributes } from "react"; //#region src/VisuallyHidden/VisuallyHidden.d.ts /** * Provides a component that implements the "visually hidden" technique. This is * analogous to the common `sr-only` class. Children that are rendered inside * this component will not be visible but will be available to screen readers. * * Note: if this component, or a descendant, has focus then this component will * no longer be visually hidden. * * @see https://www.scottohara.me/blog/2023/03/21/visually-hidden-hack.html */ declare const VisuallyHidden: ({ className, children, ...rest }: VisuallyHiddenProps) => React.JSX.Element; type VisuallyHiddenProps = React.PropsWithChildren<HTMLAttributes<HTMLSpanElement> & { className?: string; }>; //#endregion export { VisuallyHidden, VisuallyHiddenProps };