SusSnackbar

Transient toast — text, timeout, location, optional actions.
Package
SusKit · Atoms (commercial)
SusKit · Atoms
Props
| Name | Type | Default | |
|---|---|---|---|
Text | Prop<string> | "" | v-model |
Variant | Prop<string> | "info" | v-model |
Timeout | Prop<int> | 5000 | v-model |
Location | Prop<string> | "bottom-center" | v-model |
CloseOnContentClick | Prop<bool> | false | v-model |
Vertical | Prop<bool> | false | v-model |
MultiLine | Prop<bool> | false | v-model |
ShowTimer | Prop<bool> | false | v-model |
CloseLabel | Prop<string> | "OK" | v-model |
Overlay | Prop<bool> | false | v-model |
Slots
| Name |
|---|
(default) |
actions |
Events
| Name | Field | Payload |
|---|---|---|
Close | OnClose | — |
Style hooks
USS class contract — override appearance without touching C#. States toggle via these classes:
sus-slotsus-snackbarsus-snackbar__actionssus-snackbar__bodysus-snackbar__close-btnsus-snackbar__mainsus-snackbar__textsus-snackbar__timersus-snackbar--bottomsus-snackbar--centersus-snackbar--errorsus-snackbar--infosus-snackbar--leftsus-snackbar--multi-linesus-snackbar--overlaysus-snackbar--rightsus-snackbar--successsus-snackbar--topsus-snackbar--verticalsus-snackbar--warningsus-snackbar--with-timerunity-labelunity-text-element
Usage
xml
<template>
<sus:SusSnackbar Text="Saved"
Variant="success"
Timeout="4000"
Location="bottom-center"
CloseLabel="OK"
@close="OnClosed" />
</template>
<script>
void OnClosed() { /* … */ }
</script>csharp
var toast = new SusSnackbar();
toast.Text.Value = "Connection lost";
toast.Variant.Value = "error";
toast.Timeout.Value = 5000;
toast.ShowTimer.Value = true;
toast.OnClose += () => { /* … */ };Variant
info · success · warning · error
Notes
- Slot
actionsfor custom buttons; default close usesCloseLabel. - Prefer the queue molecule (
SusSnackbarQueue) when stacking multiple toasts.