bloxa

Alert

FREE

Inline info, success, warning and error messages with actions and dismiss.

Installation

Terminal
npx @bloxa/cli add alert
# or: npx shadcn@latest add @bloxa/alert

Packages installed automatically: motion

Examples

Variants

Heads up
Your trial ends in 3 days.
New version available
Bloxa 0.2 adds overlays and notifications.
Payment received
We emailed the receipt to [email protected].

Actions, appearances and dismiss

Enable two-factor authentication
Protect your account with a code from your phone.
Domain connected

API reference

Every component also accepts the props of the element it renders.

Alert

PropTypeDefaultDescription
variant"default" | "info" | "success" | "warning" | "destructive""default"Kind; sets color and icon.
appearance"soft" | "outline" | "accent-bar""soft"Look.
titleReactNode—Title.
iconReactNode | false—Custom icon, or hide it.
actionsReactNode—Buttons.
actionsInlinebooleanfalsePut actions on the right.
dismissiblebooleanfalse× closes it with a collapse.
onDismiss() => void—Called after it closes.