Toasts


Toasts are tiny notifications that appear on the top right of your screen temporarily.
Creating Toasts
Head over to Customizer, create a new creation, and from there select "Toast"
This will bring up a dialog with some options
Title
The title of the toast. If hidden on player view, it won't be displayed (shown on the right). But it will always be shown in the customizer edit menu to help you distinguish
Scriptevent
The unique ID of the toast. Similar to the unique IDs used for |UIs
Hide on player view
Will hide the title
Editing toasts
Once you create your toast, you have more options, such as body, icons, and backgrounds.
Body text will always display and you do need it if you have hidden the title.
Icons will also show on the toast next to the text
And there are tons of backgrounds to choose from for toasts
Displaying toasts
Literally the same way as you do for UIs. Just do /leaf:open <player> <scriptevent> Do not include brackets
Please make sure to not have the scriptevent match a unique ID of a regular UI or another toast, as leaf will prioritize UIs.