Alert ​
Severities
Loading...
Dismissible
Loading...
Without Title
Loading...
Alerts display brief messages for the user without interrupting their use of the app.
- Tag:
<flint-alert> - Class:
FlintAlert
Import ​
ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintAlert } from '@getufy/flint-ui';Usage ​
html
<flint-alert></flint-alert>Properties ​
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
severity | severity | 'info' | 'success' | 'warning' | 'error' | 'info' | The severity level of the alert. |
variant | variant | 'info' | 'success' | 'warning' | 'error' | — | Alias for severity. Visual style variant. |
title | title | string | '' | An optional title for the alert. |
dismissible | dismissible | boolean | false | Whether the alert can be dismissed by the user. |
closable | closable | boolean | — | Alias for dismissible. Whether the alert can be closed. |
Events ​
| Event | Detail | Description |
|---|---|---|
flint-alert-close | { open: false, severity: string } | Fired when the alert's close button is clicked. detail: { open: false, severity: string } |
Slots ​
| Name | Description |
|---|---|
(default) | The message content of the alert. |
icon | Optional icon to display instead of the default severity icon. |
CSS Parts ​
| Name | Description |
|---|---|
base | The component's base wrapper element. |
close-button | The close button element. |
icon | The icon container. |
message | The message content area. |
title | The title element. |
CSS Custom Properties ​
| Property | Default |
|---|---|
--flint-font-family | — |
--flint-border-radius-md | — |
--flint-info-bg | — |
--flint-info-border-color | — |
--flint-info-text-color | — |
--flint-info-icon-color | — |
--flint-success-bg | — |
--flint-success-border-color | — |
--flint-success-text-color | — |
--flint-success-icon-color | — |
--flint-warning-bg | — |
--flint-warning-border-color | — |
--flint-warning-text-color | — |
--flint-warning-icon-color | — |
--flint-error-bg | — |
--flint-error-border-color | — |
--flint-error-text-color | — |
--flint-error-icon-color | — |
--flint-active-color | — |
--flint-primary-color | — |