Overview
Reference usage
Inline note for tips, warnings, or contextual notes within content flow. It is quiet by default: with no variant it is the neutral note, an icon and muted text with no tint. Emphasis comes from position, size and weight first; tints are for a warning or a blocking condition, with at most one tinted box on a screen. A caller that wants the tinted info look passes variant="info".
Usage
Neutral note with an action
variant="neutral", the default, is a note that is not a status. It is the same card as every tone (a fill, a hairline edge, the radius and the inset); the tone changes only the tint and the icon, and neutral's fill is the quiet sunken surface. The message is capped at 68 characters wide, and the action sits at the trailing end of the text while it fits and wraps under it, at the start edge, when it cannot (actionLayout="stacked" always puts it under). Under about 30rem of callout width the icon sits beside the first line only, so later lines, the progress line and the action row start at the callout's own padding. Use it to explain a state, with one link or button:
The one notice
Callout is the single notice in Cinder's chat surfaces: one box, one layout, and only the tone varies.
variant:info,success,warningordangertint the box with a 1px edge in the tone's colour;neutralis the quiet, untinted note.icon: the leading tone icon, a 16px glyph in the first track. Pass the icon for the tone (Info,TriangleAlert,OctagonAlert).title: an optional string or snippet rendered in a paragraph. A snippet must emit phrasing content, such as text and<code>. SupplytitleText,aria-label, oraria-labelledbyto name the callout.- children: the text.
progress: an optional snippet under the text inside the content column, usually a smallProgresswith its own accessible name.action(actionLayout="inline", the default): onesmsecondaryButtonat the trailing end of the text. It wraps under the text, at the text's own edge, only when the row cannot hold both.actionLayout="stacked"puts the action under the text at the trailing edge, andactionLayout="stacked-start"under it at the leading edge, for a notice whose action is the next step and should lead (a failure's Retry or Refresh preview).actionLayout="beside"is for one icon-only action (a retry or remove glyph): it stays beside the text at every width, phone included.actionLayout="fit"is the default's layout with that same reach: the action sits beside the text at every width while both fit, a phone's included, and drops under it, at the trailing edge, only when they cannot. Draw a worded action as that onesmsecondaryButton(its tone is the callout's, never the accent or a bare link) so every notice's action reads the same.onDismissanddismissLabel: a compact dismiss button at the trailing end, 20px painted with a 44px hit area that takes no layout space. Callout stays static, so the caller removes it.
Keep controls out of a callout
A callout is a note beside the content it qualifies. Do not wrap a form control or an inline choice, such as a SegmentedControl, in a tinted callout: the tint makes a choice look like a warning, the control stretches to fill a box it was not drawn for, and its own colours clash with the status colour. Place the control in the page flow with a plain label, and keep the callout for one short note, with one link or button at its end.
When to use
- Highlighting an aside inside prose or documentation.
- Putting a tip or caveat beside the content it qualifies.
- Explaining a state in a quiet neutral note that is not a problem, with one link or button at its end.
- Showing an identifier in a phrasing-content title snippet. Use titleText for its name unless an ARIA label is supplied.
- Announcing a transient or urgent status — use alert or banner instead.
- Communicating a page-wide system message — use banner so it reads as a landmark region.
- Wrapping a form control or an inline choice, such as a segmented-control — place it in the page flow with a plain label instead.
Examples
Basic callout
Inline aside next to body content. With no variant it is the quiet neutral note.
Neutral note with an action
A plain note that explains a state, with an icon and one link under the message.
Callout variants
All four semantic variant styles for inline callouts.
Props
Name | Type | Default | Description |
|---|---|---|---|
variant | 'neutral''info''success''warning''danger' | 'neutral' | Visual + semantic variant. Default 'neutral', a quiet note of an icon and muted text with no tint; the status variants are tinted, so keep them for a warning or a blocking condition. |
semantic | 'aside' | 'note' | 'aside' | Root semantics. Default 'aside'; use 'note' for static note semantics without a complementary landmark. |
title | discriminated-union | Title rendered in a paragraph. The snippet must emit phrasing content. | |
titleText | text | Plain text for a snippet title. Used as the accessible name after aria-labelledby and aria-label. | |
icon | snippet | Optional decorative icon rendered inside an aria-hidden wrapper.
The icon is a second visual channel alongside variant color — it
helps satisfy WCAG 1.4.1 (Use of Color) by ensuring the variant is
conveyed by more than color alone. The accessible meaning still
lives in title and/or children; the icon must not be the only
carrier of information. | |
action | snippet | Optional action rendered under the message, usually one Link or Button, such as "Open
attempt 5". Several actions sit in a row that wraps, and a button label never wraps. It is
interactive content, so it is the one part of a callout a person can act on; the callout
itself stays static. | |
actionLayout | 'stacked''stacked-start''inline''beside''fit' | 'inline' | Layout for the action slot. Default 'inline': one compact action at the trailing end of the message while it fits, wrapping under the message at its start edge when it cannot. stacked always puts the action under the message, at the trailing edge. stacked-start puts it under the message, at the leading edge, for a notice whose action is the next step and should lead. beside keeps one icon-only action at the trailing end of the message at every width, so a phone's callout is not made a row taller by a glyph. fit is inline that keeps its action beside the message at every width, a phone's too, while both fit in one row, and drops it under the message, at the trailing edge, only when they cannot. |
progress | snippet | Optional progress line rendered under the message inside the content column, usually a small
Progress. It is decorative to the callout: give the Progress its own accessible name. | |
onDismiss | () => void | When set, a compact dismiss button renders at the trailing end and calls this on activation. The callout stays static: the caller removes it. | |
dismissLabel | text | 'Dismiss' | Accessible name of the dismiss button. Default 'Dismiss'. |
children required | snippet | Callout body content. |