Banner
FeedbackMITAlert banner with info, success, warning, error, and neutral variants plus dismiss.
bun add @otfdashkit/ui
Preview
BannerFeedback
Loading Storybook preview…
Code
@otfdashkit/uiimport { Banner } from '@otfdashkit/ui'
export function Example() {
return (
<div className="flex flex-col gap-3 w-full max-w-lg">
<Banner variant="info" title="Info" description="Something you should know about." dismissible />
<Banner variant="success" title="Success" description="Everything went smoothly." dismissible />
<Banner variant="warning" title="Warning" description="Might need your attention." dismissible />
<Banner variant="error" title="Error" description="Something went wrong." dismissible />
<Banner variant="neutral" title="Neutral" description="A general notice." dismissible />
</div>
)
}
Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.
Kit for this component
Everything Bundle$149 · 6 kits + 20 templates
Show a notice or announcement across the top of a page.
Props
Props declared in the Banner source. Inherited HTML attributes are not listed.
| Prop | Type | Default | Description |
|---|---|---|---|
| action | BannerAction | ||
| children | ReactNode | ||
| className | string | ||
| description | string | ||
| dismissible | boolean | ||
| icon | boolean | true | |
| onDismiss | () => void | ||
| title | string | ||
| variant | 'info' | 'success' | 'warning' | 'error' | 'neutral' | null | 'info' |