UNPKG

nuxt

Version:

Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.

24 lines (23 loc) 794 B
import type { Ref } from 'vue'; export type AnnouncerPoliteness = 'assertive' | 'polite' | 'off'; export type NuxtAnnouncerOpts = { /** @default 'polite' */ politeness?: AnnouncerPoliteness; }; export type NuxtAnnouncer = { message: Ref<string>; politeness: Ref<AnnouncerPoliteness>; set: (message: string, politeness?: AnnouncerPoliteness) => void; polite: (message: string) => void; assertive: (message: string) => void; _cleanup: () => void; }; /** * Composable for announcing messages to screen readers * @since 3.17.0 * @example * const { polite, assertive } = useAnnouncer() * polite('Item saved successfully') * assertive('Error: Form is invalid') */ export declare function useAnnouncer(opts?: NuxtAnnouncerOpts): Omit<NuxtAnnouncer, '_cleanup'>;