Alert
Alerts are used to communicate a state that affects a system, feature or page.
Import
Sajari UI exports 6 alert related components.
Alert
: The wrapper for alert components.AlertBody
: The wrapper for the content of the alert.AlertTitle
: The title of the alert to be announced by screen readers.AlertDescription
: The description of the alert to be announced by screen readers.AlertActions
: A wrapper for any actions for the alert.AlertButton
: A button within the alert actions.
Usage
Editable Example
Warning
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam convallis.
Status
Change the status of the alerts by passing the status
prop. This affects the
color scheme and icon used. Alert supports error
, success
, warning
, and
info
statuses.
Editable Example
Error
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam convallis semper fermentum.
Success
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam convallis semper fermentum.
Warning
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam convallis semper fermentum.
Information
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam convallis semper fermentum.
Variant
Change the design of the alert using the variant
prop. Currently only 'subtle'
is supported as an alternative, which removes the border, padding and shadow.
Editable Example
Warning
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam convallis.
Props
Alert Props
Alert is the wrapper for alert component. It composes the Card
component.
Name | Type | Default | Description |
---|---|---|---|
appearance | 'error' , 'success' , 'warning' , 'info' | 'warning' | The purpose of the alert. |
variant | 'default , 'subtle' | 'default' | The variant of the alert. |
AlertBody Props
AlertBody composes Box
.
AlertTitle Props
AlertTitle composes the Text
component.
AlertDescription Props
AlertDescription composes the Text
component.
AlertActions Props
AlertActions composes the ButtonGroup
component.
AlertButton Props
AlertButton composes the Button
component.
Name | Type | Default | Description |
---|---|---|---|
primary | boolean | false | Is the button the primary action. |