Alert

Displays a short, important message in a way that attracts the user's attention.

Installation

Import the component from the passport-ui package.

components/example.tsx
1
2
import { Alert } from "passport-ui";
import { InfoIcon } from "lucide-react";

Usage

Basic example showing how to use the component.

components/example.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
<Alert
title="Heads up!"
description="You can add components and dependencies to your app using the cli."
icon={<InfoIcon />}
/>
{/* With variants */}
<Alert
variant="warning"
title="Warning"
description="Please review this information carefully before proceeding."
icon={<AlertTriangleIcon />}
/>

Additional resources

Documentation and examples are available in Storybook.