Note

Fiddle
Inline message with an icon: info, success, warning, error, bold.

Preview 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.
  • title says what happened, subtitle what to do; the action goes in rightContent.
  • With a long subtitle the action drops below the text. rightContentLayout="inline" keeps it beside the text from md up (it stacks below on narrow screens), for banners where the action should stay in view.
  • info, success, warning and error carry status. bold and default are 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", or alert for 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

PropValues
variant"default""bold""info""success""warning""error"
VariantsDefaultBoldInfoSuccessWarningErrorNoteRightContentWrapRightContentInlineAllVariantsNarrowWidth

Keep going

Content
Write plainly with sentence case. Follow these guidelines to ensure you do so.