Skip to content

Alert

The Alert component displays important messages with different severity levels.

Good morning!

Your cup of coffee is ready.

// Import components
import {
Alert,
Icon,
} from '@fintech-sandpit/ui/react';
// Import styles (optional)
import '@fintech-sandpit/ui/style/components/alert.css';
import '@fintech-sandpit/ui/style/components/icon.css';
// Import icon
import { faCupHot } from '@fortawesome/free-solid-svg-icons';
return (
<Alert
status="info"
size="md"
variant="solid"
>
<Icon as={faCupHot} />
<div className="space-y-1">
<p className="font-bold">
Good morning!
</p>
<p>Your cup of coffee is ready.</p>
</div>
</Alert>
);
NameTypeDefaultDescription
sizeAlertSizemdAlert size
statusAlertStatusinfoAlert type
variantAlertVariantsolidAlert variant styling
noIconbooleanfalseHide the icon
type AlertSize = 'sm' | 'md' | 'lg'
type AlertStatus = 'info' | 'success' | 'warning' | 'danger'
type AlertVariant = 'solid' | 'subtle' | 'outline'