alert Component

Alert System

Basic Alerts - Flexible Content Structure

Preview Code
Copy
Simple alert with direct text - no wrapper needed!

Alert with a paragraph element for better semantic HTML.

Warning Title

Description text can follow the title directly - no .content wrapper required.

Using .content wrapper

The .content wrapper is optional but still fully supported for complex layouts.

Alert Sizes - Icons Auto-Scale

Preview Code
Copy

Tiny alert - icon auto-sized to w-3.5 h-3.5

Small alert - icon auto-sized to w-4 h-4

Default alert - icon auto-sized to w-5 h-5

Large alert - icon w-5 h-5

Icons scale appropriately with alert size.

Big alert - icon w-6 h-6

Largest alert gets the biggest icon automatically.

Alert Width Variants - Compact for Toasts

Preview Code
Copy

Compact Width (Toast Style):

This is a compact alert perfect for toast notifications

Small compact alert

Error toast message

Info notification

Alert Colors - Automatic Icons

Preview Code
Copy

Primary - auto uses 'info' icon

Positive - auto uses 'circle-check' icon

Negative - auto uses 'circle-x' icon

Warning - auto uses 'triangle-alert' icon

Info with custom 'bell' icon override

Red

Orange

Yellow

Olive

Green

Teal

Blue

Violet

Purple

Pink

Brown

Grey

Black

Automatic Icon Injection - Simplify Your HTML!

Preview Code
Copy

Simple Usage - Just add 'icon' and icon name:

Alert with bell icon - no manual <i> tag needed!
Alert with rocket icon
Alert with heart icon

With Semantic Types - Icons chosen automatically:

Just add 'icon' - uses circle-check automatically
Negative alert - uses circle-x automatically
Warning alert - uses triangle-alert automatically

Override Defaults - Specify custom icon:

Positive with party-popper instead of check
Negative with ban icon instead of x
Warning with siren instead of triangle

Mix with Other Features:

Small + Positive + Icon + Dismissible

Large Outlined Alert

With custom shield-check icon and structured content.

Filled Variant - All Colors

Preview Code
Copy

Primary filled alert with solid background

Positive filled alert with solid background

Negative filled alert with solid background

Warning filled alert with solid background

Info filled alert with solid background

Red filled

Orange filled

Yellow filled

Olive filled

Green filled

Teal filled

Blue filled

Violet filled

Purple filled

Pink filled

Brown filled

Grey filled

Black filled

Outline Variant - All Colors

Preview Code
Copy

Primary outline alert

Positive outline alert

Negative outline alert

Warning outline alert

Info outline alert

Red outline

Orange outline

Yellow outline

Olive outline

Green outline

Teal outline

Blue outline

Violet outline

Purple outline

Pink outline

Brown outline

Grey outline

Black outline

Alerts with Titles - All Colors

Preview Code
Copy

Alerts with Actions

Preview Code
Copy

Alert Groups (Stacked)

Preview Code
Copy

First notification in the stack

Second notification in the stack

Third notification in the stack

Auto-Dismiss Alerts

Preview Code
Copy
Dismissible Alert with Progress

This alert is dismissible and shows progress. Use the button below to add auto-dismiss timer.