0.1.0-alpha.2 • Published 4 years ago

@bianic-ui/live-region v0.1.0-alpha.2

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
4 years ago

Live Regions

ARIA Live Regions are used to communicate important information to screen reader software.

Installation

yarn add @bianic-ui/live-region

Import components

import { LiveRegion, useLiveRegion } from "@bianic-ui/live-region"

Usage

import { useLiveRegion } from "@bianic-ui/live-region"

function Example() {
  const region = useLiveRegion()
  return (
    <button
      onClick={() => {
        region.speak("Filtering categories was successful")
      }}
    >
      Click me
    </button>
  )
}