Information Alert
Set up
Import Alert, BorderAlert, and InfoAlert and set variables in the script tag.
<script>
import { InfoAlert } from "flowbite-svelte";
</script>
Examples
Info header 1
InfoAlert without View more and Dismiss button.
<InfoAlert>
<span slot="header">Info header 1</span>
InfoAlert without View more and Dismiss button.
</InfoAlert>
Info header 2
InfoAlert with View more and Dismiss button.
<InfoAlert
alertId="info-alert-2"
color="green"
closeBtn
infoLink="/"
>
<span slot="header">Info header 2</span>
InfoAlert with View more and Dismiss button.
</InfoAlert>
Info header 3
InfoAlert with View more and Dismiss button.
<InfoAlert
alertId="info-alert-3"
color="red"
closeBtn
infoLink="/"
>
<span slot="header">Info header 3</span>
InfoAlert with View more and Dismiss button.
</InfoAlert>
Info header 4
InfoAlert with View more and Dismiss button.
<InfoAlert
alertId="info-alert-4"
color="yellow"
closeBtn
infoLink="/"
>
<span slot="header">Info header 4</span>
InfoAlert with View more and Dismiss button.
</InfoAlert>
Info header 5
InfoAlert with View more and Dismiss button.
<InfoAlert
alertId="info-alert-5"
color="gray"
closeBtn
infoLink="/"
>
<span slot="header">Info header 5</span>
InfoAlert with View more and Dismiss button.
</InfoAlert>
Info header 4
InfoAlert with View more and Dismiss button.
<InfoAlert
alertId="info-alert-6"
color="indigo"
closeBtn
infoLink="/"
>
<span slot="header">Info header 4</span>
InfoAlert with View more and Dismiss button.
</InfoAlert>
Info header 4
InfoAlert with View more and Dismiss button.
<InfoAlert
alertId="info-alert-7"
color="purple"
closeBtn
infoLink="/"
>
<span slot="header">Info header 4</span>
InfoAlert with View more and Dismiss button.
</InfoAlert>
Info header 4
InfoAlert with View more and Dismiss button.
<InfoAlert
alertId="info-alert-8"
color="pink"
closeBtn
infoLink="/"
>
<span slot="header">Info header 4</span>
InfoAlert with View more and Dismiss button.
</InfoAlert>
Props
The component has the following props, type, and default values. See type-list page for type information.
Name | Type | Default |
---|---|---|
color | Colors | 'blue' |
alertId | string | 'alert-additional-content-1' |
infoLink | string | undefined |
closeBtn | boolean | false |