Skip to content
Liquidify
HomeDocsComponentsExamplesPlayground
⌘K
(opens in new tab)
Liquidify

Accessible React controls with a CSS and SVG material engine.

Product

ComponentsExamplesPlaygroundPackages

Learn

DocumentationGetting startedConceptsAI resources

Project

CommunityShowcaseVersionsGitHub

Independent open-source software. Not affiliated with or endorsed by Apple Inc.

LicenseBrand

Component catalog

Browse the public controls by interaction purpose. Every result links to generated API facts, accessibility behavior, source, and exhaustive stories.

Banner

A persistent, in-flow bar that surfaces a short status or notification without blocking the page: a status glyph, a title, an optional secondary message, an optional row of trailing actions, and an optional dismiss control.

import { Banner } from "@liquidify/react/banner"

Overview

Basic Banner

A focused starting point showing Banner with its essential configuration.

API

PropTypeDefaultDescription
actionsreadonly BannerAction[] | undefined—Trailing action row, keyed by each action's stable `id`.
classNamestring | undefined—Optional additional CSS class merged into the glass surface class. The supported per-instance customisation seam: override any `--lq-*` custom property from this class's CSS — the token cascade the engine reads (ADR-0004). No raw inline style is involved, so this stays ADR-0003 clean.
defaultOpenboolean | undefinedtrueUncontrolled seed for the open state — a banner passed no `open` renders visible.
dismissibleboolean | undefinedtrueRenders the trailing `xmark` dismiss control when `true`.
dismissIconReactNode—Custom dismiss glyph — an SF-Symbol-style name string or a node (the `Image(systemName:)` analogue, mirroring {@link BannerProps.icon}); when omitted the default self-drawn `xmark` cross renders. Purely visual: the control keeps its `aria-label` ({@link BannerProps.dismissLabel}) either way.
dismissLabelstring | undefinedDismissAccessible name override for the dismiss control.
iconReactNode—Leading status glyph. An SF-Symbol-style name string or a node; when omitted a status-default glyph is derived from {@link BannerProps.status}.
idstring | undefined—Native `id` forwarded to the bar root (charter §8: no silently-discarded inherited props).
itemsreadonly ReactNode[] | undefined—Optional bulleted supporting points. Each item receives the same native Banner message typography configured through `messageProps`.
labelPropsLabelProps | undefined—Per-instance typography override for the title, forwarded to the internal `Text` (ADR-0028). Spread last over the computed default.
liveboolean | undefinedtrueWhen `false`, the banner is a static, labelled `role="region"` (not a live region) — for banners present at page load rather than dynamically raised.
material"frosted" | "regular" | "clear" | undefinedenclosing `<Material default>`, else `"regular"`Material of the glass surface — `frosted · regular · clear` (§06). Forwarded to the engine, which resolves the chain `prop ?? <Material default> ?? "regular"`, so a bare surface inherits the enclosing provider default.
messageReactNode—Optional secondary copy; the `aria-describedby` target.
messagePropsLabelProps | undefined—Per-instance typography override for the message, forwarded to the internal `Text` (ADR-0028). Spread last over the `footnote`/`secondary` default.
onOpenChange((open: boolean) => void) | undefined—Fires with the next boolean on every close path (dismiss, or `closesOnPress` action).
openboolean | undefined—Controlled open state. Passing it switches Banner to controlled mode.
perf"low" | "high" | undefinedderived from `<Backdrop type>`, else `"low"`Perf budget of the glass surface (ADR-0006/0007). Forwarded to the engine as `data-glass-perf`; `"high"` opts this surface into the edge-lensing filter. When omitted, derives from the enclosing `<Backdrop type>` (§04).
refRef<HTMLDivElement> | undefined—Forwarded ref to the rendered element — the bar `<div>` carrying the a11y role; attached while `open` and `null` while dismissed.
statusBannerStatus | undefinedinfoSeverity axis — selects the default glyph + accent colour (glyph/edge only, never a full-surface wash, ADR-0019) and the derived a11y `role`.
title
required
ReactNode—The bar's primary text — required, the `aria-labelledby` target.

Guidelines

Do
  • Use Banner when its semantics match the content or action.
  • Keep labels concise, specific, and consistent with the surrounding interface.
  • Test the component with keyboard navigation, zoom, and both color schemes.
Don't
  • Do not use Banner as a visual substitute for a different semantic element.
  • Do not rely on color or an icon alone to communicate essential meaning.
  • Do not override the component tokens with fixed values unless the product theme requires it.

Accessibility

Banner preserves the semantics of its content and should be given a clear accessible label when its visible content does not provide one.

Keyboard
  • Use meaningful visible text whenever possible.
  • Mark purely decorative imagery as hidden from assistive technology.
  • Verify reading order at increased text sizes.

Tokens

NameValue
--lq-alert-control-filllight-dark( var(--lq-color-system-gray-2-default-light), var(--lq-color-system-gray-3-default-dark) )
--lq-banner-gapvar(--lq-space-12)
--lq-banner-padvar(--lq-space-16)
--lq-color-action-destructive#ff3b30
--lq-color-label-primaryComponent-defined value
--lq-color-label-secondaryComponent-defined value
--lq-color-separatorrgba(60, 60, 67, 0.14)
--lq-color-system-blue-defaultComponent-defined value
--lq-color-system-green-defaultComponent-defined value
--lq-color-system-orange-defaultComponent-defined value
--lq-color-system-red-defaultComponent-defined value
--lq-duration-0ms80ms120ms150ms250ms350ms500ms
--lq-easing-cubic-bezier(0.25, 0.1, 0.25, 1)cubic-bezier(0, 0, 0.2, 1)cubic-bezier(0.4, 0, 1, 1)cubic-bezier(0.175, 0.885, 0.32, 1.275)cubic-bezier(0.25, 0.46, 0.45, 0.94)
--lq-glass-440.71.15var(--lq-segmented-control-indicator-blur)calc(var(--lq-glass-material-blur) * 8)var(--lq-shadow-presentational)
--lq-opacity-muted0.4
--lq-radius-0.25rem0.375rem0.5rem0.625rem0.875rem1.125rem1.375rem9999rem
--lq-radius-pill9999rem
--lq-shadow-presentationalvar(--lq-shadow-ambient-3)
--lq-space-0.0625rem0.125rem0.25rem0.5rem0.75rem1rem1.25rem1.5rem2rem2.5rem3rem3.5rem

Key features

  • Liquid material

    Uses Liquidify surfaces and theme-aware design tokens.

  • Typed API

    Provides a typed React API with generated prop documentation.

  • Accessible by default

    Preserves semantic structure, focus visibility, and assistive-technology state.

Resources

  • Source
  • Markdown
  • JSON
  • Storybook
Components