@primer/react
Version:
An implementation of GitHub's Primer Design System using React
17 lines • 799 B
TypeScript
import type React from 'react';
import { type HTMLAttributes } from 'react';
/**
* 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
*/
export declare const VisuallyHidden: ({ className, children, ...rest }: VisuallyHiddenProps) => React.JSX.Element;
export type VisuallyHiddenProps = React.PropsWithChildren<HTMLAttributes<HTMLSpanElement> & {
className?: string;
}>;
//# sourceMappingURL=VisuallyHidden.d.ts.map