Alert

@sushindustries/ui

The Markdown callout, reachable from JSX - application news in the same box the docs already use.

5 min read
View as MarkdownEdit on GitHub

Props

PropTypeDefaultDoes
titlestring-
children?ReactNode-
tone?"note" | "tip" | "caution""note"What kind of news this is. note is the calm default.
live?boolean-Only interruptions are announced; page furniture is not.

Notes

TypeScript restricts tone to "note" | "tip" | "caution", but the runtime check is stricter still: anything that reaches the component as neither "tip" nor "caution" renders as note, which only matters if the prop is ever set from unchecked data. children is optional - an alert with only a title renders a one-line box with no body, which is correct for news that needs no elaboration.