hp-banner
Inline informational callout — non-dismissable, sits in the document flow. Use to
mark notes, tips, warnings, alerts, and errors within page content.
tone drives both the accent colour and the leading icon;
label adds an uppercase header above the slotted body. Sibling of
<hp-toast> (transient floating notification).
neutral). Use for general information that helps the
reader without changing what they have to do.
<hp-button>;
it expects a single-line label.
Install
bun add @hexpunk/core lit import "@hexpunk/core"; Properties
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
tone | tone | HpBannerTone | "neutral" | Semantic tone. `alert` / `error` upgrade role to "alert" for assertive screen-reader announcement. |
label | label | string | undefined | — | Optional uppercase header label (e.g. "Note", "Warning"). |
Slots
| Slot | Description |
|---|---|
(default) | Banner body content |
CSS Parts
| Part | Description |
|---|---|
banner | The wrapping container |
icon | The leading icon |
label | The uppercase label header (when set) |
When to use
neutral or
warn; reserve alert / error for things
that really demand the reader's full attention.
<hp-toast> — it auto-dismisses and floats over content.
Accessibility
tone="alert" / "error" auto-stamp
role="alert" on the host so assistive tech announces them
assertively. The other tones use role="note". The leading icon is
aria-hidden — the label and body carry the meaning.
No per-component entries in CHANGELOG.md yet.