@stihl-design-system/components
Version:
Welcome to the STIHL Design System react component library.
27 lines (26 loc) • 1.08 kB
TypeScript
import { JSX } from 'react';
export interface AriaLiveRegionsProps {
/**
* Enables micro-frontend / Web Component integration mode.
*
* When `true`, the component:
* - Renders nothing in the React tree (returns `null`).
* - Synchronously injects the live regions directly under `document.body`.
* - No-ops if the regions already exist (idempotent).
*
* Use this mode when:
* - Multiple independent micro-frontends may exist on the same page.
* - You cannot guarantee placement close to `<body>` in the React tree.
*
* The injection happens during React's commit phase (via `useInsertionEffect` or
* `useLayoutEffect`), ensuring regions exist before any dependent component's
* effects run.
*
* @default false
*/
microFrontendMode?: boolean;
}
/**
* A component that provides hidden ARIA live regions for accessibility, allowing screen readers to announce changes dynamically.
*/
export declare const DSAriaLiveRegions: ({ microFrontendMode, }: AriaLiveRegionsProps) => JSX.Element | null;