Skip to content

Banner / inline alert

In review
Live · web

Intents: an inset status disc + text, never color alone

A new session was created on api-server.
Deploy finished. nockerl-design is live.
New: agent spawning is live. Dispatch a session from any task.
Read-only: this workspace is locked by your administrator.

Title vs message-only

With action vs no icon

Tip: press ⌘K to jump to any session.

Dismissible: tab to the X, Enter / Space to collapse

Memory indexed1,204 messages were embedded into the session store.
Action fired 0 times · dismissed 0. The island is live.
// Web: React, consuming @dizyx/nockerl-tokens. No Banner ships yet on ANY
// platform; this is the proposed @dizyx/nockerl-react API, derived from the
// shipped inline-alert vocabulary (errorContainer + the agent ErrorSegment).
export function SessionBanners() {
return (
<>
<Banner intent="info" message="A new session was created on api-server." />
<Banner intent="success" title="Memory indexed" message="1,204 messages embedded." dismissible onDismiss={ack} />
<Banner
intent="warning"
title="Local model unreachable"
message="Falling back to the cloud provider for this turn."
actionLabel="Retry"
onAction={retry}
/>
<Banner intent="danger" message="Build failed: the container exited 1." actionLabel="Logs" onAction={openLogs} />
<Banner intent="neutral" icon={false} message="Read-only: this workspace is locked." />
</>
);
}
PropTypeDefaultDescription
message *stringBody copy: the message. Carries the alert's accessible text.
intentNockerlBannerIntent'info'Semantic intent: drives the status color, the default icon, and role.
titlestringOptional bold heading above the message (a single short line).
iconbooleantrueShow the leading status disc. Defaults to on; turn off for a bare banner.
actionLabelstringOptional inline action label (a quiet text button, right-aligned).
onAction() => voidAction handler. Ignored when no actionLabel is given.
dismissiblebooleanfalseShow a dismiss (X), a separate focusable control.
onDismiss() => voidDismiss handler (the X).
Cross-platform drift (tracked for reconciliation)

The banner now ships on web as NockerlBanner in @dizyx/nockerl-react, and on both natives as NockerlBanner. The web component is the one documented above; the native surfaces are on their own migration track, so treat the list below as the reconciliation list rather than as a description of one shared API:

  • Source patterns differ: Android has the inline ErrorSegment + the errorContainer tokens (tonal status fill + status hairline + status icon/text); Voice has only the RecordingHUD error row (a warning glyph + message). Neither is a reusable component, so this page proposes the shared one.
  • info intent color: Android/web map info to the brand cyan (status.info); Voice has no info status token and would use NockerlTheme.accent. One mapping should be canonized.
  • Neutral intent: Voice has no neutral-status surface; it would fall back to a plain chromeSurface card with on-surface text. Android/web wash with onCard.