Banner
A full-width announcement bar for the top of a page or section, optionally dismissible and remembered.
Status: beta. Category: Feedback.
import { Banner } from '@glyphui/ui'
Exports: Banner, bannerStyles.
Notes
- Rendered as a labelled region ("Announcement") so screen-reader users can find or skip it.
Example: Tones
import { Banner } from '@glyphui/ui'
export default function Example() {
return (
<div className="grid gap-3">
<Banner tone="primary">Glyph 1.0 is out. Read what changed in the release notes.</Banner>
<Banner>You're viewing a shared workspace in read-only mode.</Banner>
<Banner tone="warning">Scheduled maintenance Sunday 02:00–03:00 UTC.</Banner>
<Banner tone="danger">We couldn't reach your payment provider. Retrying in 5 minutes.</Banner>
</div>
)
}
Example: Dismissible
With storageKey, a dismissed banner stays hidden on later visits.
import { Banner, Button } from '@glyphui/ui'
export default function Example() {
return (
<Banner
tone="info"
dismissible
storageKey="docs-banner-webinar"
action={
<Button size="sm" variant="outline">
Register
</Button>
}
>
Live walkthrough of the theme engine on Thursday at 17:00 CET.
</Banner>
)
}
Live page: https://glyphui.xyz/components/banner