Package Exports
- @hakuna-matata-ui/live-region
- @hakuna-matata-ui/live-region/dist/hakuna-matata-ui-live-region.cjs.js
- @hakuna-matata-ui/live-region/dist/hakuna-matata-ui-live-region.esm.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@hakuna-matata-ui/live-region) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Live Regions
ARIA Live Regions are used to communicate important information to screen reader software.
Installation
yarn add @hakuna-matata-ui/live-region
Import components
import { LiveRegion, useLiveRegion } from "@hakuna-matata-ui/live-region"
Usage
import { useLiveRegion } from "@hakuna-matata-ui/live-region"
function Example() {
const region = useLiveRegion()
return (
<button
onClick={() => {
region.speak("Filtering categories was successful")
}}
>
Click me
</button>
)
}