Alert
The Alert component displays important messages with different severity levels.
Good morning!
Your cup of coffee is ready.
Good morning!
Your cup of coffee is ready.
Example
Section titled “Example”import { Alert } from '@fintech-sandpit/ui/react';import { faCupHot, faInfoCircle } from '@fortawesome/free-solid-svg-icons';
return ( <Alert icon={faCupHot} status="info" size="md" variant="solid" > <p> <strong>Good morning!</strong> </p>
<p>Your cup of coffee is ready.</p> </Alert>);<script setup lang="ts">import { Alert } from '@fintech-sandpit/ui/vue';import { faCupHot, faInfoCircle } from '@fortawesome/free-solid-svg-icons';</script>
<template> <Alert :icon="faCupHot" status="info" size="md" variant="solid" > <p> <strong>Good morning!</strong> </p> <p>Your cup of coffee is ready.</p> </Alert></template>| Name | Type | Default | Description |
|---|---|---|---|
icon | IconDefinition 1 | Custom icon 2 | |
size | AlertSize | md | Alert size |
status | AlertStatus | info | Alert type |
variant | AlertVariant | solid | Alert variant styling |
- See Icons for the list of available icon definitions.
- If no icon is provided, the icon will be auto-selected based on the
statusprop.
type AlertSize = 'sm' | 'md' | 'lg'type AlertStatus = 'info' | 'success' | 'warning' | 'danger'type AlertVariant = 'solid' | 'subtle' | 'outline'