Skip to content

Alert

An inline notice bar for success, info, warning, or error messages, with support for a custom title and a close button.

Basic usage

Four types

This is a regular info messageThe operation completed successfullyPlease save your current progressOperation failed, please try again later

No title

No title

An alert with only body content and no title line.

Closable

Closable

Click the ✕ on the right to close this alertA closable alert without a title

Event feedback

Event feedback

Dispatches the oas-close event when closed

API

Attributes

AttributeDescriptionTypeDefault
closeableWhether to show the close buttonboolean
titleTitle textstring
typeAlert typestringinfo

Events

EventDescription
oas-closeDispatched after the close button is clicked; the component then hides

Slots

NameDescription
default

error uses role="alert", other types use role="status".