Skip to content

Banner

Category: Feedback

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

Install: @helix-ui/core

import { Banner } from '@helix-ui/core';

status: stable · since: 0.2.0

Tags: alert, page-level, persistent, announcement

Open the full editor or source on GitHub.

┌─[icon]── Title — short description ───────── [Action] [×] ─┐
└────────────────────────────────────────────────────────────────┘
  • display — block
  • width — fill
  • height — content
  • intrinsicSize — full-bleed at the top of a page or section
  • stackable — false
  • fullBleed — true

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.

Name Type Default Description
tone 'info' | 'success' | 'warning' | 'danger' | 'neutral' info Color intent.
title ReactNode — Bold headline.
description ReactNode — Body text.
icon ReactNode — Leading icon.
actions ReactNode — Right-aligned actions.
dismissible boolean false Show a close button.
open boolean — Controlled visibility. When omitted, the close button manages internal state.
onOpenChange (open: boolean) => void — Visibility change handler.
  • children — additional content below description

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

Role: status

Notes

  • For non-interruptive page state. For critical errors that block the user, prefer Dialog.
  • Close button has aria-label="Dismiss".
Component Relation Note
PageHeader sibling Renders above PageHeader at the top of a page.
Callout alternative Use Callout inline within content; Banner is page-level.
Toast alternative Toast for transient; Banner for persistent.
Dialog sibling

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

“page-wide maintenance notice”

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

“banner saying changes published”

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