Toast
A non-blocking notification with auto-dismiss.
s0 add toast
Usage
@State private var showToast = false
S0.Toast("Changes saved!", isPresented: $showToast)S0.Toast("Something went wrong",
variant: .destructive,
isPresented: $showError)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| message | String | — | Notification text. |
| variant | ToastVariant | .default | Style: .default, .success, .destructive, .warning. |
| isPresented | Binding<Bool> | — | Controls toast visibility. Auto-dismisses after 3s. |