Alert
An inline message: title, text, an icon of the registry, the color variants and an optional close button.
ray upgrade.API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-alert> · RayAlert
Announced as an alert. The icon follows the color (info, circle-check, alert-triangle, circle-x) unless icon or slot=icon.
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
label | label | string | Title. | |
color | color reflects | string | A palette color or any CSS color. | |
variant | variant reflects | light | filled | outline | default | transparent | light | Visual style. |
radius | radius | xs | sm | md | lg | xl | Corner radius. | |
icon | icon reflects | string | A registered icon name, or none. | |
closable | closable reflects | boolean | A close button; closing hides the alert (cancel ray-close to keep it). | |
closeLabel | close-label | string | Dismiss (text alert.close) | Accessible name of the close button. |
| Event | Description |
|---|---|
ray-close | The close button was pressed; cancelable. |
| Slot | Description |
|---|---|
| (default) | Text. |
icon | A custom icon. |
| Part | Description |
|---|---|
alert | The box. |
close | The close button. |
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
| Key | English |
|---|---|
alert.close | Dismiss |