Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SnackBar",
"description": "Shows a transient toast message at the bottom of the screen.",
"type": "object",
"examples": [
{
"title": "Confirm with a toast",
"description": "SnackBar is a transient toast — the right choice for routine feedback like 'Copied' or 'Saved'. It disappears automatically and never blocks the UI. Use Alert instead when the user must acknowledge.",
"document": {
"PresentationType": "Button",
"Text": "Save changes",
"BorderRadius": 6,
"Color": "#FFFFFF",
"BackgroundColor": "#2F6FED",
"OnClick": {
"Handler": "SnackBar",
"Message": "Saved.",
"Duration": 2500
}
}
}
],
"x-version": "1.0",
"required": [
"Handler",
"Message"
],
"properties": {
"Handler": {
"const": "SnackBar"
},
"Message": {
"type": "string",
"description": "The text shown in the toast."
},
"Duration": {
"type": "integer",
"description": "How long the toast stays visible, in milliseconds. Defaults to 4000."
},
"Color": {
"type": "string",
"description": "Text color as a hex code; defaults to the theme's snackbar text color."
},
"BackgroundColor": {
"type": "string",
"description": "Toast background as a hex code; defaults to the theme's snackbar background."
},
"OnSuccess": {
"$ref": "/schema/Actions/Action/1.0/index.json"
},
"OnFailure": {
"$ref": "/schema/Actions/Action/1.0/index.json"
}
},
"x-icon": "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"14\" width=\"18\" height=\"6\" rx=\"3\"/><path d=\"M7 17h6\"/></svg>",
"$id": "/schema/Actions/SnackBar/1.0/index.json",
"x-family": "Actions",
"x-name": "SnackBar",
"x-source-package": "zero-schema"
}
SnackBar is a transient toast — the right choice for routine feedback like 'Copied' or 'Saved'. It disappears automatically and never blocks the UI. Use Alert instead when the user must acknowledge.
{
"PresentationType": "Button",
"Text": "Save changes",
"BorderRadius": 6,
"Color": "#FFFFFF",
"BackgroundColor": "#2F6FED",
"OnClick": {
"Handler": "SnackBar",
"Message": "Saved.",
"Duration": 2500
}
}