Alert

View as Markdown

A short message beside the content it's about, in any tone, with an optional next step: a paused workflow, a refusal, a failed sync.

Invoices sync every hourChanges in Northwind Freight's ledger show here within the hour.

When to use

A short message beside the content it's about, in any tone, with an optional next step: a paused workflow, a refusal, a failed sync. Use Banner instead when the message is about the whole product, not the content beside it.

Usage

import { Callout } from "./ui/uicontext/components/Callout.ts"
export const ScheduleNote = <M>(h: Html.H<M>) =>	Callout(h, { title: "Runs every weekday" }, "It starts at 9:00 in the workspace's time zone.")

Examples

Tones and a next step

Invoice sync is paused. Resume
Runs every weekday at 9:00.
Reconnected. Replay the run to try the step again.

API reference

Options

Callout options
NameTypeDescription
titlestringA few words above the message, in bold: "Couldn't reach the ledger".
tone"neutral" | "accent" | "danger" | "warning" | "success" | "info"What it means: the dot's color, and danger makes it an alert; neutral, with no dot, by default.
hrefstringA page or setting that helps, linked after the message.
linkLabelstringThe link's words; "Learn more" by default.
styleStyleStyleX styles applied after the callout's own.

Keyboard and accessibility

  • A danger callout is an alert, announced when it appears; any other is a polite status. The tone's dot is hidden from screen readers.
  • The words must carry the meaning; the tone only colors it.

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/alert

Source