Inline Alert

An inline React message box in neutral, success, warning and danger tones with a matching icon, an optional title and body text. Announced with role alert.

src/registry/ui/inline-alert.tsx/r/inline-alert.json

Tones

Installation#

bash
npx shadcn@latest add @minidev/inline-alert

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/inline-alert.json

Usage#

tsx
import { InlineAlert } from "@/components/ui/inline-alert"

export function Example() {
  return (
    <InlineAlert className="max-w-md" tone="warning" title="Action needed">Add a payment method to keep access.</InlineAlert>
  )
}

API reference#

InlineAlert props
PropTypeDefault
titleReact.ReactNode-
childrenReact.ReactNode-
tonekeyof typeof icons"neutral"
classNamestring-

Dependencies#

npm

lucide-react

Built from

No other MiniDev files

Examples#

All alerts, toasts and empty states

Learn more