Example#
The old links stop working on 1 March.
Usage#
Use a callout for a short note that should not be missed: a tip, a warning, an error summary, an audit verdict. Every tone shares the white plate and the ink rule; they differ by glyph and title, and warnings and errors add a heavier rule and a hatch strip, so salience never depends on colour (N10).
- Tones.
note,tip,warning,errorandsuccess. - The title is required and visible: it carries the point.
livegives a callout inserted after load the alert or status role; static callouts need none.- Not for decoration. If everything is a callout, nothing is.
Anatomy#
The old links stop working on 1 March.
- HatchWarnings and errors: a 6 px strip of ink stripes.
.mk-callout-hatch - GlyphOne shape per tone.
.mk-callout-glyph - TitleThe point, in a sentence.
.mk-callout-title - BodyOne or two sentences.
.mk-callout-body
Volume#
Reading layer: identical at every volume.
Quiet
The old links stop working on 1 March.
Redirects are set up.Studio
The old links stop working on 1 March.
Redirects are set up.Press
The old links stop working on 1 March.
Redirects are set up.Rave
The old links stop working on 1 March.
Redirects are set up.
Content#
- The title states the fact: "The old links stop working on 1 March."
- The body says what to do or what has been done: "Redirects are set up."
- Errors say how to fix it, never just that something failed.
Do and don't#
Do
The old links stop working on 1 March.
Don't
Warning
Accessibility#
- Tones differ by glyph and title, warnings and errors by a heavier rule and a hatch strip: never by colour alone.
livemakes an inserted callout an alert (error, warning) or a status (the rest).
| Keys | What happens |
|---|---|
| (none) | Not interactive |
The colour pairs it prints, with their contrast on both papers:
| Text | Surface | Role | Bone | Night |
|---|---|---|---|---|
--mk-ink | --mk-paper | body | 16.49:1 · Lc 97.4, passes | 16.21:1 · Lc 96.1, passes |
--mk-ink | --mk-paper | body-ui | 16.49:1 · Lc 97.4, passes | 16.21:1 · Lc 96.1, passes |
--mk-ink | --mk-paper | long | 16.49:1 · Lc 97.4, passes | 16.21:1 · Lc 96.1, passes |
--mk-ink | --mk-paper-sunken | body | 15.20:1 · Lc 92.2, passes | 15.53:1 · Lc 95.7, passes |
--mk-ink | --mk-paper-sunken | body-ui | 15.20:1 · Lc 92.2, passes | 15.53:1 · Lc 95.7, passes |
--mk-ink | --mk-paper-sunken | long | 15.20:1 · Lc 92.2, passes | 15.53:1 · Lc 95.7, passes |
--mk-ink | --mk-paper-plate | body | 18.42:1 · Lc 105.1, passes | 15.02:1 · Lc 95.4, passes |
--mk-ink | --mk-paper-plate | body-ui | 18.42:1 · Lc 105.1, passes | 15.02:1 · Lc 95.4, passes |
--mk-ink | --mk-paper-plate | long | 18.42:1 · Lc 105.1, passes | 15.02:1 · Lc 95.4, passes |
--mk-ink | --mk-ink-m-tint | long | 15.20:1 · Lc 92.2, passes | 13.80:1 · Lc 94.3, passes |
--mk-ink | --mk-ink-a-tint | long | 15.61:1 · Lc 93.9, passes | 13.48:1 · Lc 93.9, passes |
--mk-ink | --mk-ink-r-tint | long | 15.34:1 · Lc 92.7, passes | 13.73:1 · Lc 94.2, passes |
--mk-ink | --mk-ink-k-tint | long | 15.38:1 · Lc 92.9, passes | 13.59:1 · Lc 94.2, passes |
--mk-ink | --mk-ink-y-tint | long | 15.54:1 · Lc 93.6, passes | 13.60:1 · Lc 94.1, passes |
--mk-ink | --mk-ink-wood-tint | long | 15.42:1 · Lc 93.1, passes | 13.70:1 · Lc 94.2, passes |
--mk-ink | --mk-ink-go-tint | long | 15.65:1 · Lc 94.0, passes | 13.38:1 · Lc 93.9, passes |
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
tone | CalloutTone | none | |
title required | ReactNode | none | Required and visible. |
live | boolean | none | `role="alert"` for error and warning, `role="status"` otherwise; only when inserted dynamically. |
titleAs | "h2" | "h3" | "h4" | "p" | p | The title's element (default `p`; a heading where the callout starts a section). |
children | ReactNode | none |
Tokens#
System tokens (19)
--mk-border--mk-border-thick--mk-font-text--mk-radius-control--mk-space-1--mk-space-2--mk-space-3--mk-space-4--mk-space-5--mk-surface--mk-text--mk-type-body-ui-leading--mk-type-body-ui-size--mk-type-body-ui-tracking--mk-type-body-ui-weight--mk-type-field-label-leading--mk-type-field-label-size--mk-type-field-label-tracking--mk-type-field-label-weight
Its own properties (3)
--mk-callout-hatch--mk-callout-pad--mk-callout-rule
Changelog#
Arrived in 0.1.0.
- The reading layer's controls, overlays, forms and visitor prefs (P2-T1 to P2-T5): every Button is the comic hit key, with IconButton, Link and Tooltip; Input, Textarea, Select, Checkbox and CheckboxGroup, Radio and RadioGroup, Switch, Slider with the ruler, RulerReadout and SegmentedControl; Dialog, Drawer, NavSheet, Tabs, Disclosure, Faq and faqJsonLd on Base UI 1.9 where the platform falls short; Field, Fieldset, Form with the site's inline validation, ErrorSummary, Callout, Honeypot, FormTimestamp and QuoteForm; PrefsScript under 1 KB, usePref and setPref with cross-tab sync, ThemeToggle and the visitor VolumeDial; VisuallyHidden.