API and Development
Alert, AlertLayout, and AlertType from @prepared911/ui/alert.
| Prop | Default | Meaning |
|---|---|---|
title | required | Primary message. LocalizedMessage. |
description | Optional supporting copy. LocalizedMessage. | |
type | AlertType.Note | Semantic variant for paint, icon, and ARIA role. |
layout | AlertLayout.Columns | Columns or Rows. |
dismissible | With onDismiss, shows a dismiss control. | |
dismissTitle | Accessible name for dismiss. Required when dismissible is true. | |
onDismiss | Called when the user dismisses the alert. | |
ctaButton | Optional action beside dismiss: label, onClick, disabled, loading. | |
role | from type | note, alert, or status. |
aria-label | Accessible name when the title is not enough. | |
className | Classes appended after generated paint classes. | |
ref | Ref to the root element. |
style and children are excluded. Other native div attributes pass through.
| Name | Type | Default | Description |
|---|---|---|---|
title | LocalizedMessage | — | Primary message. |
aria-label | LocalizedMessage | — | Accessible name for the root when title alone is insufficient. |
className | string | — | Classes appended after generated paint classes. |
ctaButton | AlertCtaButton | — | Optional CTA beside dismiss. |
description | LocalizedMessage | — | Optional supporting copy beneath the title. |
dismissible | boolean | — | When true with {@link AlertDismissProps.onDismiss}, shows a dismiss control. |
dismissTitle | LocalizedMessage | — | Accessible name for the dismiss control. Required when {@link AlertLayoutProps.dismissible} is true. |
layout | AlertLayout | — | Layout variant. Defaults to {@link AlertLayout.Columns}. |
onDismiss | (() => void) | — | Called when the user dismisses the alert. |
ref | Ref<HTMLDivElement> | — | Ref to the root element. |
role | "note" | "alert" | "status" | — | ARIA role override. |
type | AlertType | — | Semantic variant. Defaults to {@link AlertType.Note}. |