Snackbar

A snackbar is an important message that persists until dismissed by a user.
Example
Theme
Auto
Auto
Light
Dark
Scale
Medium
Large
Medium
Small
The file has been successfully restored.
<div class="ts-snackbar">
    <div class="content">The file has been successfully restored.</div>
    <button class="action">Undo</button>
</div>
Introduction

Snackbar usually was placed in a corner, similar to Notice but capable of holding action button.

Structure
Content

Content is the main message of the snackbar.

First online casino is live!
<div class="ts-snackbar">
    <div class="content">First online casino is live!</div>
</div>
Action

A snackbar can have an action button.

This file is corrupted.
<div class="ts-snackbar">
    <div class="content">This file is corrupted.</div>
    <button class="action">Move to trash</button>
</div>
Close

A snackbar can have a close button to dismiss the message.

You will receive an email notification.
<div class="ts-snackbar">
    <div class="content">You will receive an email notification.</div>
    <button class="close"></button>
</div>
Variations
Negative

A snackbar action can hint towards a negative consequence.

You have five unread messages.
<div class="ts-snackbar">
    <div class="content">You have five unread messages.</div>
    <button class="action is-negative">Delete all</button>
</div>
Looking for similar components?
Designed by Yami Odymel from Taiwan, along with the ❤️ from contributors. The source code is licensed under MIT, and the documentation is under CC 0 public domain. Feel free to use, share, or contribute. Tocas UI is a design system for Caris Events, part of Sorae & Co., Ltd.
Translators: Yami Odymel
Trademark of the owner of Tocas UI