@reach/visually-hidden
Version:
Render text that is announced to screen readers but visually hidden.
45 lines (40 loc) • 1.32 kB
TypeScript
/**
* @reach/visually-hidden v0.18.0
*
* Copyright (c) 2018-2022, React Training LLC
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
import * as React from 'react';
import * as Polymorphic from '@reach/polymorphic';
/**
* Welcome to @reach/visually-hidden!
*
* Provides text for screen readers that is visually hidden.
* It is the logical opposite of the `aria-hidden` attribute.
*
* @see https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
* @see https://a11yproject.com/posts/how-to-hide-content/
* @see Docs https://reach.tech/visually-hidden
* @see Source https://github.com/reach/reach-ui/tree/main/packages/visually-hidden
*/
/**
* VisuallyHidden
*
* Provides text for screen readers that is visually hidden.
* It is the logical opposite of the `aria-hidden` attribute.
*/
declare const VisuallyHidden: Polymorphic.ForwardRefComponent<"span", VisuallyHiddenProps>;
/**
* @see Docs https://reach.tech/visually-hidden#visuallyhidden-props
*/
interface VisuallyHiddenProps {
/**
* @see Docs https://reach.tech/visually-hidden#visuallyhidden-children
*/
children: React.ReactNode;
}
export { VisuallyHidden, VisuallyHiddenProps };