Components
Alert
A component for displaying critical information or notifications.
New Feature Added
A new feature has been added to the project.
Installation
npm install @mijn-ui/react-alertUsage
import { Alert, AlertDescription, AlertTitle } from "@mijn-ui/react-alert"<Alert>
<Terminal className="h-4 w-4" />
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components and dependencies to your app using the cli.
</AlertDescription>
</Alert>Alert Variants
default
This is a default alert.
brand
This is a brand alert.
secondary
This is a secondary alert.
success
This is a success alert.
warning
This is a warning alert.
danger
This is a danger alert.
inverse
This is a inverse alert.
API Reference
Standard element attributes are forwarded to the underlying component in addition to the props below.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "brand" | "secondary" | "success" | "warning" | "danger" | "inverse" | "default" | Color scheme of the alert. |
unstyled | boolean | false | Opt out of the default styles to fully customize the component. |
classNames | object | — | Override classes per slot (see Style Slots below). |
className | string | — | Additional classes for the root element. |
Alert Style Slots
| Slot Name | Targeted Component | Purpose |
|---|---|---|
base | Alert | Applies styles to the root Alert component. |
iconWrapper | Alert | Styles the wrapper around the alert icon. |
title | Alert | Styles the alert title. |
description | Alert | Styles the alert description text. |