Launch priceOne payment

Alert

The sentence someone has to read before they carry on: maintenance tonight, a card about to expire, an import that stopped at row 412. Warnings and errors are announced at once, everything else politely; a dismissed alert collapses away, and the action moves beside the text when there is room.

Data & feedbackFree200 lines · one file

Ready for AI tools one file typed props installs by name prompt included

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Layro's Alert for this.
Install it: npx shadcn@latest add https://layropro.com/r/alert
Import it from @/components/ui/alert.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above.

API

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
toneAlertToneWhat kind of notice it is. Default `info`.
titleReact.ReactNodeThe headline, one short line.
iconReact.ReactNode | falseReplace the tone's icon, or pass `false` for none.
actionReact.ReactNodeOne action: a button or a link, shown under the text on small screens and beside it on wide ones.
onDismiss() => voidAdds a close button. Called after it is pressed.
dismissLabelstringLabel for the close button. Default "Dismiss".
openbooleanControls whether it shows. Leave it out and a dismissed alert hides itself.
size"sm" | "md"`sm` for tight spots: inside a card, under a field. Default `md`.

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Layro foundations, installed alongside it

layro-theme

Lifetime access

Every component, and everything we ship next.

  • All 112 components, source included
  • The template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.

More in Data & feedback

All Data & feedback components