Components › Feedback

Alert

An inline message about the state of a page or section.

Installation

npx plankui@latest add alert

Usage

import { Alert } from "@/components/ui/alert";

<Alert variant="warning" title="Your card expires soon" />

API reference

PropTypeDefaultDescription
variant"info" | "success" | "warning" | "danger""info"Tone and icon.
titleReactNodeBold first line.
actionReactNodeButtons under the message.
onDismiss() => voidShows a close button when set.

View the source on GitHub