Alert
The alert provides contextual feedback messages for typical user actions.
Import
Importimport { Alert } from '@backyard-ui/core';Usage
UsageAppearance
AppearanceUse the appearance prop to change the visual semantic, this affects the color scheme and icon used.
Variant
VariantUse the variant prop to get a different style, solid, subtle or neutral.
Loading
LoadingUse isLoading props to get a loading state.
Close button
Close buttonYou can compose with a CloseButton too.
Custom icon
Custom iconTo use a custom icon, pass the icon you choose to Alert.Icon.
API Reference
API ReferenceRoot
Root- roleDescription The role of the alertType
"alert" | "status"Defaultalert - children requiredDescription The children elementsType
ReactNode - appearanceDescription The alert appearance.Type
"success" | "critical" | "info" | "warning"Defaultsuccess - variantDescription The variant is used to change the visual communication.Type
"neutral" | "solid" | "subtle"Defaultsolid - isLoadingDescription Show loading indicatorType
boolean