Announces messages to screen readers.
This package has been deprecated.
Mirrors visual alert content in an `aria-live` container for proper screen reader support.
Install the component from your command line.
npm install @radix-ui/react-announce
Import the component.
import * as Announce from '@radix-ui/react-announce';
export default () => <Announce.Root />;
Use the announce primitive.
import * as Announce from '@radix-ui/react-announce';
export default () => <Announce.Root>Welcome to Radix.</Announce.Root>;
Contains the content to announce.
Prop | Type | Default |
---|---|---|
asChild | boolean | false |
aria-atomic | enum | |
aria-relevant | enum | |
regionIdentifier | string | |
role | enum | |
type | enum | "polite" |