Components

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-alert

Usage

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.

PropTypeDefaultDescription
variant"default" | "brand" | "secondary" | "success" | "warning" | "danger" | "inverse""default"Color scheme of the alert.
unstyledbooleanfalseOpt out of the default styles to fully customize the component.
classNamesobjectOverride classes per slot (see Style Slots below).
classNamestringAdditional classes for the root element.

Alert Style Slots

Slot NameTargeted ComponentPurpose
baseAlertApplies styles to the root Alert component.
iconWrapperAlertStyles the wrapper around the alert icon.
titleAlertStyles the alert title.
descriptionAlertStyles the alert description text.