Global / Local Snacks

Lets you show global are local (bound eg. to a form) notifications.

Code sample

the message has following options:

Property

Default

Description

id

uuid.v4

An unique id for the notification -> can be used for Snack.hide(id)

message

text to show in the notification

restricted

set this to show the message on a Snack.Local if not set it will be shown globally

dismiss

5000

message will be removed after this time; if restricted is set dismiss won't have a default value and it won't be removed automatically

type

info

any string of: info, success, warning, error

Last updated