Note
A muted paragraph under a figure or a list (the mock's p.muted): 12px muted ink, 8px under what is above it ("Enough to hold the full budget.", "Never reapplied."). flush drops the margin inside a card or a grid that spaces its own parts. A TextLink may sit at its end.
import { Note } from '@ergasti/bricks';Examples
Muted text and notes
Muted is inline secondary text (12px; size="md" is 13px); Note is the muted paragraph under a figure, 8px down, and flush drops that margin.
Code
import { Card, Muted, Note, TextLink } from '@ergasti/bricks';
function MutedAndNote() {
return (
<div style={{ maxWidth: 380 }}>
<Card title="Leaderboard" actions={<Muted>Only delivered orders count</Muted>}>
<div>
<b>18 confirmed units left</b>
<Note>A challenge with gifts can't go live until its gifts are counted and confirmed. <TextLink href="#gifts" arrow>Gift stock</TextLink></Note>
</div>
</Card>
</div>
);
}After a label
"(optional)" as a field's adornment.
Code
import { FormField, Muted } from '@ergasti/bricks';
function Optional() {
return (
<div style={{ maxWidth: 360 }}>
<FormField label="Message to the brand" adornment={<Muted>(optional)</Muted>}><textarea /></FormField>
</div>
);
}Arabic
Code
import { Note } from '@ergasti/bricks';
function Arabic() {
return <Note dir="auto">الطلبات اللي اتسلمت بس هي اللي بتتحسب.</Note>;
}Props
Prop
Type
Also accepts the react and dom attributes of the element it renders; they are passed through.
Design guidance
How the BRICKS design system uses Note. Written in docs/content/components/Note.md; the props above are read from the code, which wins where the two disagree.
A muted paragraph, 12px, 8px under what is above it; use it for the one-line explanation under a figure, a list or a set of fields ("Enough to hold the full budget.", "Every manual change needs a reason. The creator is notified.").
It is the mocks' p.muted (usually written <p class="muted" style="margin:8px 0 0">). Before 0.7 screens drew it with their own paragraph class and inline margins (.kit-pr-muted plus .kit-pr-note, or a screen class); use Note instead. flush drops the margin inside a card or grid that spaces its own parts. A TextLink may sit at its end ("… confirmed. Gift stock →"). It shares its file and story with Muted.
Anatomy
- Paragraph:
<p class="kit-muted kit-mnote">:--ink-3, 12px,margin: 8px 0 0. - Children: the sentence, optionally ending in a
TextLink.
Variants
| Prop value | Look | When to use |
|---|---|---|
| default | 12px, 8px top margin | Under a figure, a SummarySection, a list of mini rows. |
flush | No margin | Inside a flex or grid container that spaces its parts (a card's 16px gap, a PageGrid stack). |
size="md" | 13px | Under 15px text. |
size="inherit" | The parent's size | Inside a block that sets its own size. |
States
Static text: no interactive states. A TextLink inside it has its own hover, focus and disabled states.
Usage
// PR Portal › Affiliate programs › Challenges › Brand request › the gift stock card: the rule and the way to Gift stock
import { Card, Note, TextLink } from '@ergasti/bricks';
export function GiftStockSide({ left }: { left: number }) {
return (
<Card title="Nile Threads gift stock">
<div>
<b>{left} confirmed units left</b>
<Note>
A challenge with gifts can't go live until its gifts are counted and confirmed.{' '}
<TextLink href="/gifts" arrow>Gift stock</TextLink>
</Note>
</div>
</Card>
);
}// PR Portal › Tiers › Manual changes by PR: the card spaces its parts, so the note is flush
import { Card, Note } from '@ergasti/bricks';
export function ManualChanges() {
return (
<Card title="Manual changes by PR">
<Note flush>Every manual change needs a reason. The creator is notified.</Note>
</Card>
);
}Where it appears
- PR Portal › Affiliate programs › Challenges › Brand request › "What the brand asked for" (what approving means) and the gift stock card (PR · Brand request).
- PR Portal › Tiers › under the manual changes (PR · Tiers).
- PR Portal › Affiliate programs › a brand's campaign › the Status card's line on what pausing does, in the gallery composition (PR · A brand's campaign);
ProgramStatusCarddraws that card for you.
Guidelines
Do
- Keep it to one or two sentences that explain the thing right above it.
- Use
flushrather than astyle={{ margin: 0 }}override when the container spaces its children. - End with a
TextLinkwhen the note points somewhere ("Gift stock →").
Don't
- Don't use it for an error or a verdict that must stand out (the red "Not enough…" line is an error style, not a
Note). - Don't stack several notes; merge them or use a
Banner. - Don't use it inline inside a label or heading; that is
Muted.
RTL and Arabic
- Inherits the direction; only the margin is vertical, so nothing mirrors. A
TextLinkarrow at its end points left in Arabic. - Arabic from the gallery: "التحدي اللي فيه هدايا مش هيشتغل غير لما هداياه تتعد وتتأكد."
Tokens
--ink-3; margin and sizes are fixed in CSS.
Accessibility
- A plain
<p>, read in order after the content it explains. - A
TextLinkat its end is a real link or button, so it is in the tab order and keeps its focus ring.
Found in the source
- No roles, ARIA attributes or key handling are set in this component's own source; it renders native elements and the components it composes.
Read from the component's source and tests. See Accessibility for the patterns the library follows.
Related
Muted: inline muted words (a span, or a div / p without the note margin).TextLink: the link at its end.Banner: a message that needs attention.SummarySection/SummaryLine: the figures a note usually sits under.
See also: Card · Leaderboard · FormField · Avatar · AvatarStack · Button · ButtonLink
Source
src/kit/primitives/Muted.tsx (line 40) on GitHub.