Note
FiddlePreview ready
Rebuilt from the latest commit.
Usage
The import, then a use to start from. Both copy as they are.
Import
import { Button } from "@/components/ui/button";import { Note } from "@/components/ui/Note";Example
<Note variant="error" title="We couldn't verify docs.acme.dev" subtitle="Check that the CNAME record points to Fern, then try again." rightContent={ <Button size="sm" variant="outline" onClick={verify}> Try again </Button> }/>When to use
Use it for
- A message about this page or form: an error, a warning before a risky step, a success that points forward.
titlesays what happened,subtitlewhat to do; the action goes inrightContent.- With a long subtitle the action drops below the text.
rightContentLayout="inline"keeps it beside the text frommdup (it stacks below on narrow screens), for banners where the action should stay in view. info,success,warninganderrorcarry status.boldanddefaultare neutral, for tips and context.
Avoid
- Confirming what just happened: that's a toast.
- A field's own error: it replaces the help text under the field.
- Several Notes in a stack. Combine them, or fix what causes them.
Accessibility
Checks
- The icon and the words carry the status, never the tint alone.
- A Note that appears after an action goes in a live region (
role="status", oralertfor errors), so it's announced.
API
Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.
Note
| Prop | Values |
|---|---|
| variant | "default""bold""info""success""warning""error" |
VariantsDefaultBoldInfoSuccessWarningErrorNoteRightContentWrapRightContentInlineAllVariantsNarrowWidth
Keep going
- StatusBadgeSystem state: live, publishing, error… Dot carries the hue, the label carries the meaning.Fiddle
- BadgeStatic labels and counts. Neutral by default; status hues only when the badge is the status.Frond
- Input, TextareaText entry. Always with a
Label; errors viaaria-invalidand aNote.Frond
Content
Write plainly with sentence case. Follow these guidelines to ensure you do so.