Skip to content

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

Fluid Functionalism is installed

Button, Card and Dialog were added to components/ui.

Statuses

Low contrast

Default

Info

Success

High contrast

Default

Info

Success

Actions

Enjoying Fluid Functionalism?

The registry has new components

Run the install command again to pull the latest versions.

Fixed

Custom icon

3 new components since your last visit

Confirmation

The requested action keeps its place in the transcript after an answer.

Run pnpm build?

Builds the app into .next. Takes about a minute.

Confirmation with the AI SDK

Map a tool approval request and its answer to the same controlled confirmation.

Run searchDocs?

Searches the project documentation.

API Reference

Types come from the public API. A dash indicates no default is documented here.

Banner props

Public source
PropTypeDefaultDescription
keystring | 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.openbooleanRequired
props.contrast"low" | "high"'low'
props.reducedMotion"user" | "always" | "never"'user'
props.variant"fixed" | "inline"—
props.status"error" | "default" | "info" | "success" | "warning"'default'
shapeShapeVariant'rounded'
sizeSizeVariant'default'
surfacenumber1
childrenView.Children<Msg, R>Required
describedboolean—Set when composing BannerDescription; avoids inspecting private VNodes.
iconView.Content<Msg, R>—
dismissibleboolean—
dismissLabelstring'Dismiss'
rolestring(status === 'warning' || status === 'error' ? 'alert' : 'status')
labelledBystring—
describedBystring—
classNamestring—