Stylish Alert
An inline alert/banner — the web "Alert" pattern from Ant Design, Chakra UI, and MUI.
Renders message (optionally with a title) in a tinted surface with a variant icon. Can be dismissed via onDismiss and can carry an action slot (e.g. a text button).
Parameters
The alert body text.
Modifier applied to the root surface.
The semantic variant controlling colors and icon.
Optional bold heading rendered above message.
When non-null, a close button is shown and this callback is invoked on tap. The caller is responsible for hiding the alert.
Optional trailing slot (e.g. a TextButton-like action). Rendered after the message.
Optional override for the alert background.
Optional override for the foreground.
Corner shape. Defaults to RoundedCornerShape with DefaultStylishDimensions.connectedCornerRadius.
Optional leading icon. Defaults to the variant icon.