Components

Alert

A visually emphasized message that informs the user of an event.

Source code

Click to see the source code for this component on GitHub. Feel free to copy it and adjust it for your own use.

Installation

Usage

Basic

Heads up
You have 23 new messages

Destructive

Error
Your session has expired. Please log in again.

Border

New users
Over 25K new users joined today!

Origin UI Examples

These are some examples that I found today over here Origin UI. I think they are cool.

To use these examples you will have to copy the code and adjust it for your own use.

Warning

Some information is missing!

Warning Outline

Some information is missing!

Error

An error occurred!

Error Outline

An error occurred!

Info

Just a quick note!

Info Outline

Just a quick note!

Success

Completed successfully!

Success Outline

Some information is missing!
Some information is missing! Add it

Sub Data

Password does not meet requirements:

  • Minimum 8 characters
  • Include a special character

Close Button

This is a description of the error that occurred.

Notifications

Close Button w/ Undo

Your profile has been updated!

Double Button

Message sent

Success Learn More

Your request was completed!

It demonstrates that the task or request has been processed.

Privacy

We Value Your Privacy 🍪

We use cookies to improve your experience, and show personalized content.

Version Update

Version 1.4 is now available!

This update contains several bug fixes and performance improvements.

Mentioned

MP

2 min ago

API Reference

Alert

NameType Default Required Description
iconClassClassValueNoClasses to add to the icon.
filledboolean | undefinedNoWhether the alert should have a filled/colored background.
modelValueboolean | undefinedtrueNoWhether or not the `Alert` is shown.
variantany"default"NoThe variant of the `Alert`
titlestring | undefinedNoThe title that is passed to the `AlertTitle` component.
descriptionstring | undefinedNoThe description that is passed to the `AlertDescription` component.
iconstring | undefinedNoThe icon that should be displayed.

Alert Description

NameType Default Required Description
asChildboolean | undefinedNoChange the default rendered element for the one passed as a child, merging their props and behavior. Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details.
asAsTag | Component | undefined"div"NoThe element or component this component should render as. Can be overwritten by `asChild`.
descriptionstring | undefinedNoThe description text that should be displayed.

Alert Title

NameType Default Required Description
asChildboolean | undefinedNoChange the default rendered element for the one passed as a child, merging their props and behavior. Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details.
asAsTag | Component | undefined"h5"NoThe element or component this component should render as. Can be overwritten by `asChild`.
titlestring | undefinedNoThe title text that should be displayed.