Skip to Content
Puzzle
UI ComponentsData display

Alert

Display contextual feedback inline.

Import

import { Alert } from "@puzzle-ui/ui";

Severity

Use severity to communicate the outcome, not color alone. Error alerts are assertive; other severities use polite status announcements.

390 × 500

Variant, icon, and dismissal

closable dismisses the alert internally and calls onClose. Set icon={false} to remove the icon, or provide a custom node.

390 × 400

API

PropTypeDefaultDescription
severity"success" | "info" | "warning" | "error""info"Feedback intent and live-region semantics.
variant"standard" | "outlined" | "filled""standard"Visual treatment.
titleReactNode-Optional heading.
childrenReactNode-Message body.
iconReactNode | falseSeverity iconCustom icon or no icon.
closablebooleanfalseAdds a dismiss button.
closeLabelstring"Dismiss alert"Accessible button name.
onClose() => void-Called after dismissal.

Native div attributes, className, and style are supported. Dismissed alerts render nothing; remount to show them again.

;