Skip to content

Alert

Temporary notifications that provide concise feedback about actions or events

Installation

sh
npm add @heroui-vue/alert
sh
pnpm add @heroui-vue/alert
sh
yarn add @heroui-vue/alert
sh
bun add @heroui-vue/alert

NOTE

If you use global installation, you can skip this installation step

Import

js
import { Alert } from '@heroui-vue/alert'
js
import { Alert } from 'heroui-vue'

Usage

This is an alert
Thanks for subscribing to our newsletter!

Colors

Alert has 6 color variants to convey different meanings.

This is a default alert
This is a primary alert
This is a secondary alert
This is a success alert
This is a warning alert
This is a danger alert

Variants

This is a solid alert
This is a bordered alert
This is a flat alert
This is a faded alert

Custom Icon

By default, the Alert component displays a corresponding icon based on the color prop. You can override this behavior by providing a custom icon using the icon slot.

An alert with a custom icon

Without Icon

You can hide the icon by setting the hideIcon prop to true.

This is an alert
Thanks for subscribing to our newsletter!

Without Icon Wrapper

You can hide the icon wrapper by setting the hideIconWrapper prop to true.

Bordered Alert
This is a bordered variant alert

MIT Licensed