Source
<norn-callout><p>Useful information to keep in mind.</p></norn-callout>
Copy {name} to clipboard
Copy
Copied
Copy failed
html code
An aside in long-form text, set apart like a pull quote: a short label with an icon over the body, on a quiet raised panel. Use it for a fun fact, a tip, or a point worth a pause. It is not a status message: use norn-notice for one. The kinds match GitHub's alerts and differ only in the label's color, its default text, and its icon. callouts in @allons-y/webc-patterns/markdown writes the same markup for a Markdown > [!NOTE] blockquote. Its role is note: it is not a landmark.
<norn-callout><p>Useful information to keep in mind.</p></norn-callout>
Copy {name} to clipboard
Copy
Copied
Copy failed
html code
<norn-rich-text>
<p>A custom element can be defined at any time. The browser upgrades the elements it has already parsed, so a component's markup works before its script has run, and works without it.</p>
<norn-callout>
<span slot="heading">Did you know?</span>
<p>The first web page went live in 1991, and its markup is still valid HTML today.</p>
</norn-callout>
<p>That is the reason to prefer native elements: a page written for them keeps working as the platform grows, with no rewrite to follow it.</p>
</norn-rich-text>
Copy {name} to clipboard
Copy
Copied
Copy failed
html code
<div style="display: grid; gap: 0.75rem">
<norn-callout webc:for="(variant, index) of $data.csf.argTypes.props.variant.options" :@variant="variant"><p @text="['Useful information to keep in mind.', 'A faster way to do the same thing.', 'Something a reader needs to succeed.', 'Needs attention right away.', 'Can cause a problem you can\'t undo.'][index] || ''"></p></norn-callout>
</div>
Copy {name} to clipboard
Copy
Copied
Copy failed
html code
> [!TIP]
> Run the build once before you change anything.
Copy {name} to clipboard
Copy
Copied
Copy failed
markdown code
<div style="display: grid; gap: 1.5rem">
<div style="display: grid; gap: 0.5rem">
<p><code>variant = note</code></p>
<div>
<norn-callout @variant="note"><p>Useful information to keep in mind.</p></norn-callout>
</div>
</div>
<div style="display: grid; gap: 0.5rem">
<p><code>variant = tip</code></p>
<div>
<norn-callout @variant="tip"><p>Useful information to keep in mind.</p></norn-callout>
</div>
</div>
<div style="display: grid; gap: 0.5rem">
<p><code>variant = important</code></p>
<div>
<norn-callout @variant="important"><p>Useful information to keep in mind.</p></norn-callout>
</div>
</div>
<div style="display: grid; gap: 0.5rem">
<p><code>variant = warning</code></p>
<div>
<norn-callout @variant="warning"><p>Useful information to keep in mind.</p></norn-callout>
</div>
</div>
<div style="display: grid; gap: 0.5rem">
<p><code>variant = caution</code></p>
<div>
<norn-callout @variant="caution"><p>Useful information to keep in mind.</p></norn-callout>
</div>
</div>
</div>
Copy {name} to clipboard
Copy
Copied
Copy failed
html code
Write them with the @ prefix, and :@ for an expression.
| Name | Type | Description |
|---|---|---|
@variant |
string |
The kind of aside. One of note, tip, important, warning, or caution. Falls back to note. |
| Name | Description |
|---|---|
heading |
The label over the body, as one element, such as <span slot="heading">Did you know?</span>. Falls back to the site's componentStrings for the variant, then the variant's name, such as "Note". |
default |
The body. |
The global tokens from tokens.json the component reads. Set one in a project's tokens.css to change it everywhere.
Type a value to try it in every example above. Reset puts the default back.
| Token | Type | Default | Override |
|---|---|---|---|
--norn-ui-accentThe brand color, shared by every component. |
<color> |
#2346d4 |
|
--norn-ui-border-radiusCorner radius. |
<length> |
6px |
|
--norn-surface-raisedRaised surface. |
<color> |
light-dark(hsl(40, 14%, 96%), #242932) |
|
--norn-text-baseText color. |
<color> |
light-dark(#16181d, #eceef3) |
|
--norn-text-accentThe accent for text and links: darkened in light mode, lightened in dark mode. The lightness caps keep any accent at 4.5:1 or better. |
<color> |
light-dark(oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 82%, black) min(l, 0.5) c h), oklch(from color-mix(in oklch, var(--norn-ui-accent, #2346d4) 55%, white) max(l, 0.72) c h)) |
|
--norn-font-bodyBody face. |
<font-family> |
ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif |
|
--norn-font-headingHeading face. Follows the body face until the project sets one. |
<font-family> |
var(--norn-font-body, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif) |
|
--norn-font-size-sSmall text: captions, code, navigation, and notes. |
<length> |
0.875rem |
|
--norn-font-size-lLede, card title, and third-level heading. |
<length> |
1.25rem |
|
--norn-space-xsExtra small spacing step. |
<length> |
0.5rem |
|
--norn-space-sSmall spacing step. |
<length> |
0.75rem |
|
--norn-space-mMedium spacing step. |
<length> |
1.25rem |
|
--norn-space-lLarge spacing step. |
<length> |
2rem |
|
--norn-status-successSuccess. The color of a tip, a success notice, and a copied mark. |
<color> |
light-dark(#0b6b3a, #7ed6a1) |
|
--norn-status-warningWarning. |
<color> |
light-dark(#9a4a00, #ffb36b) |
|
--norn-status-dangerDanger. The color of a caution and an error. |
<color> |
light-dark(#b42318, #ff8a80) |