title: Alerts & Badges

Alerts & Badges

Feedback components for displaying important messages and status indicators.

Basic Alerts

Information

This is an informational alert message.

Success

Your changes have been saved successfully.

Warning

Please review your information before proceeding.

Error

An error occurred while processing your request.

<div class="alert alert-info">
  <div class="alert-content">
    <div class="alert-title">Title</div>
    <p class="alert-description">Message</p>
  </div>
</div>

Simple Alerts

A simple info alert without a title.

Operation completed successfully!

Using <w-alert> Component

This alert was created using the w-alert component. Your profile has been updated. This is a warning without a title.
<w-alert type="info" title="Information">
  Alert message here
</w-alert>

<w-alert type="success">
  Alert without title
</w-alert>

Dismissible Alerts

Click the X to dismiss this alert.

Dismissible Warning

This warning can be dismissed.

<div class="alert alert-info alert-dismissible">...
  <button class="alert-close" onclick="this.parentElement.remove()">X</button>
</div>

Alert Sizes

Small alert with compact padding.

Default size alert.

Large alert with more padding.

<div class="alert alert-info alert-sm">...</div>
<div class="alert alert-info">...</div>
<div class="alert alert-info alert-lg">...</div>

Callouts

Callouts are similar to alerts but with a left border accent.

Note

This is a default callout with neutral styling.

Info

This callout provides additional information.

Tip

Here's a helpful tip for your workflow.

Caution

Be careful when performing this action.

Warning

This action cannot be undone!

<div class="callout callout-info">
  <div class="callout-title">Info</div>
  <p>Callout content</p>
</div>

Badges

Default (Soft) Badges

Primary Secondary Success Warning Danger Info

Solid Badges

Primary Secondary Success Warning Danger

Outline Badges

Primary Secondary Success Warning Danger
<span class="badge badge-primary">Primary</span>
<span class="badge badge-solid-success">Solid</span>
<span class="badge badge-outline-danger">Outline</span>

Using <w-badge> Component

Primary Success Solid Danger Outline Warning
<w-badge type="primary">Primary</w-badge>
<w-badge type="solid-success">Solid Success</w-badge>

Badge Sizes

Small Default Large
<span class="badge badge-primary badge-sm">Small</span>
<span class="badge badge-primary">Default</span>
<span class="badge badge-primary badge-lg">Large</span>

Badge Shapes

Pill (default) Rounded
<span class="badge badge-primary">Pill</span>
<span class="badge badge-primary badge-rounded">Rounded</span>
<span class="badge badge-dot badge-dot-success"></span>

Badges in Context

In Buttons

In Lists

Inbox 24
Drafts 3
Spam 99+

CSS Classes Reference

Alert Classes

Class Description
alertBase alert container
alert-infoInfo/blue styling
alert-successSuccess/green styling
alert-warningWarning/yellow styling
alert-dangerDanger/red styling
alert-dismissibleAdds space for close button
alert-smSmall size
alert-lgLarge size
alert-titleAlert title styling
alert-descriptionAlert message styling
alert-closeClose button styling

Badge Classes

Class Description
badgeBase badge
badge-primary/secondary/etcSoft color variants
badge-solid-*Solid background variants
badge-outline-*Border-only variants
badge-smSmall size
badge-lgLarge size
badge-roundedRounded corners instead of pill
badge-dotStatus dot indicator