Atelier UI

Search components…

Search components…

Alert

Inline alert with info, success, warning and error variants, optional title, dismiss button and action.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

AlertProps

Also accepts all props of Omit<React.ComponentProps<"div">, "title">

PropTypeDefaultDescription
variantAlertVariant"info"—
titleReact.ReactNode——
descriptionReact.ReactNode——
dismissiblebooleanfalseShows a dismiss button. The alert hides itself and calls `onDismiss`.
onDismiss() => void——
actionReact.ReactNode—Optional action, e.g. a button or link, rendered under the text.

Install

$ npx shadcn@latest add https://chromotion.dev/r/alert.json

More like this