Skip to main content

Callout

Every example on this page is live, drawn by the library's Storybook, where you can also change its props and see the result.

A message box with border-style variants. Uses different border styles to differentiate severity levels.

Import​

import { Callout } from "~lib/feedback/callout";

Props​

NameTypeRequiredDefaultDescription
childrenReactNodeYesN/ACallout message body
titlestringNoN/ACallout heading, kept to one line
variant"info" | "tip" | "warning" | "error"No"info"Visual style
size"sm" | "md"No"md"Padding and text size

Variant border styles: info = solid, tip = double, warning = dashed, error = thick solid.

Examples​

Info​

Open Info in Storybook

Tip​

Open Tip in Storybook

Warning​

Open Warning in Storybook

Error​

Open Error in Storybook

Small​

Use size="sm" in short widgets. It trims the padding and sets the title and message in smaller text, so the callout takes far less height.

Open Small in Storybook

Long Title​

The title always stays on one line. When it is too long for the callout it ends in "…" instead of wrapping onto a second line.

Open Long Title in Storybook

See Also​