Skip to content

Banner

Banner

<Banner
tone="warning"
title="Quota almost full"
description="You've used 92% of your monthly storage."
actions={<Button size="sm">Upgrade</Button>}
dismissible
/>

Install: @helixui/core

import { Banner } from '@helixui/core'

status: stable · since: 0.2.0

Tags: alert, page-level, persistent, announcement

Anatomy

┌─[icon]── Title — short description ───────── [Action] [×] ─┐
└────────────────────────────────────────────────────────────────┘

Layout

  • displayblock
  • widthfill
  • heightcontent
  • intrinsicSizefull-bleed at the top of a page or section
  • stackablefalse
  • fullBleedtrue

Visual

A full-bleed colored band at the top of a page or section. Tinted background per tone (info/success/warning/danger), a leading icon, message text, optional action button, and a dismiss × on the right.

Props

NameTypeDefaultDescription
tone'info' | 'success' | 'warning' | 'danger' | 'neutral'infoColor intent.
titleReactNodeBold headline.
descriptionReactNodeBody text.
iconReactNodeLeading icon.
actionsReactNodeRight-aligned actions.
dismissiblebooleanfalseShow a close button.
openbooleanControlled visibility. When omitted, the close button manages internal state.
onOpenChange(open: boolean) => voidVisibility change handler.

Slots

  • children — additional content below description

Tokens used

color.bg.action.brand.subtle, color.bg.action.brand.default, color.bg.action.success.subtle, color.bg.action.success.default, color.bg.action.warning.subtle, color.bg.action.warning.default, color.bg.action.danger.subtle, color.bg.action.danger.default, color.bg.surface.subtle, color.text.action.brand, color.text.action.success, color.text.action.warning, color.text.action.danger, color.text.primary, color.border.default, radius.md, radius.sm, space.2, space.3, space.4, font.family.sans, font.size.sm, font.weight.semibold, font.lineHeight.normal

Accessibility

Role: status

Notes

  • For non-interruptive page state. For critical errors that block the user, prefer Dialog.
  • Close button has aria-label="Dismiss".

Composes with

ComponentRelationNote
PageHeadersiblingRenders above PageHeader at the top of a page.
CalloutalternativeUse Callout inline within content; Banner is page-level.
ToastalternativeToast for transient; Banner for persistent.
Dialogsibling

Prompt examples

These are the AI prompt → JSX mappings used by the helixui prompt DSL and integrations like Cursor / Claude Code.

announce a maintenance window

“page-wide maintenance notice”

<Banner tone="warning" title="Maintenance window" description="We'll be down 9–10pm UTC tonight." onDismiss={hide} />

success after a long action

“banner saying changes published”

<Banner tone="success" title="Changes published." />