Alert
An inline alert banner with icon and variant styling.
s0 add alert
Usage
S0.Alert {
S0.AlertTitle("Heads up!")
S0.AlertDescription("You can add components using the CLI.")
}S0.Alert(variant: .destructive) {
S0.AlertTitle("Error")
S0.AlertDescription("Something went wrong.")
}Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| variant | AlertVariant | .default | Style: .default, .destructive, .success, .warning. |
| content | @ViewBuilder () -> Content | — | Use AlertTitle and AlertDescription inside. |