Banner
A status message: 1 colored icon, a title, an optional description and up to 3 actions.
Installation
Install Banner from the Fluid Effect UI registry.
Playground
Statuses
Actions
Fixed
Custom icon
Confirmation
The requested action keeps its place in the transcript after an answer.
Confirmation with the AI SDK
Map a tool approval request and its answer to the same controlled confirmation.
API Reference
Types come from the public API. A dash indicates no default is documented here.
Banner props
Public source| Prop | Type | Default | Description |
|---|---|---|---|
key | string | undefined | '' | The child's identity among its parent's children of one component. The empty string by default. |
onEmit | Show type((events: { readonly _tag: "DismissRequested"; } | { readonly _tag: "Exited"; }) => NoInfer<Msg> | undefined) | { readonly DismissRequested: (event: { readonly _tag: "DismissRequested"; }) => NoInfer<Msg> | undefined; readonly Exited: (event: { readonly _tag: "Exited"; }) => NoInfer<Msg> | undefined; } | undefined | — | Handle the child's events with a callback, or supply one handler per tag for tagged events. Return a parent message to dispatch it, or `undefined` to ignore the event. |
props.open | boolean | Required | |
props.contrast | "low" | "high" | 'low' | |
props.reducedMotion | "user" | "always" | "never" | 'user' | |
props.variant | "fixed" | "inline" | — | |
props.status | "error" | "default" | "info" | "success" | "warning" | 'default' | |
shape | ShapeVariant | 'rounded' | |
size | SizeVariant | 'default' | |
surface | number | 1 | |
children | View.Children<Msg, R> | Required | |
described | boolean | — | Set when composing BannerDescription; avoids inspecting private VNodes. |
icon | View.Content<Msg, R> | — | |
dismissible | boolean | — | |
dismissLabel | string | 'Dismiss' | |
role | string | (status === 'warning' || status === 'error' ? 'alert' : 'status') | |
labelledBy | string | — | |
describedBy | string | — | |
className | string | — |