Alerts
Svelte ComponentDisplay customizable alerts to garner attention and provide critical actions.
Import
Package
Source
Doc
Examples
Hello Skeleton!
Hello Skeleton!
Hello Skeleton!
Hello Skeleton!
Success!
Error!
Getting Started
This component makes use of role="alert"
and aria-live="polite"
.
let visible: boolean = true;
<Alert {visible}>
<svelte:fragment slot="lead">(icon)</svelte:fragment>
<svelte:fragment slot="title">(title)</svelte:fragment>
<span>(message)</span>
<svelte:fragment slot="trail">(trail)</svelte:fragment>
</Alert>
Styling
Use the background
and border
properties to style your alert.
<Alert background="bg-primary-500/20" border="border border-primary-500">...</Alert>