Banner
Global alerts. Drive critical actions. Ensure visibility.
Deploy previews are now free on every plan
Every pull request gets its own preview URL, with no extra build minutes.
Installation
pnpm dlx nachui add bannerAnatomy
Composition
Use the following composition to build a
Banner:Variants
info
Scheduled maintenance on Mar 14
The dashboard is read only from 02:00 to 04:00 UTC. Running deploys are not affected.
warning
Your API key expires in 5 days
The key ending in 8f21 stops working on Mar 28. Rotate it before then to avoid failed requests.
danger
We could not charge your card
The payment for invoice INV-2043 was declined. Update your billing details before Mar 20 to keep the Team plan.
success
acmestudio.dev is verified
DNS records propagated and the certificate was issued. Production traffic is live.
Dismissible
Your trial ends in 3 days
After Mar 20 the workspace drops to the free plan and keeps one project.
API Reference
Banner
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "info" | "warning" | "danger" | "success" | "default" | Controls the visual treatment and surface colors. |
icon | React.ReactNode | — | Optional custom icon overriding the variant icon. |
onClose | () => void | — | Callback fired when the banner is dismissed. |
sticky | boolean | false | Sticks the banner to the top of the viewport. |
className | string | — | Additional CSS class names. |
children | React.ReactNode | — | Compose the banner with Content, Title, and Action. |
Banner.Content
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | — | Wraps Title and Description. |
className | string | — | Additional CSS class names. |
Banner.Title
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | — | Heading text for the banner. |
className | string | — | Additional CSS class names. |
Banner.Description
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | — | Supporting text for the banner. |
className | string | — | Additional CSS class names. |
Banner.Action
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | — | Link destination. |
children | React.ReactNode | — | Action label text. |
className | string | — | Additional CSS class names. |
Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.