BlogPlaygroundOne

Snackbars

The v-snackbar component is used to display a quick message to a user. Snackbars support positioning, removal delay, and callbacks.

Usage

a v-snackbar in its simplest form displays a temporary and closable notification to the user.


API

ComponentDescription
v-snackbarPrimary Component
v-btnSub-component typically used for actions
Toggle Inline API

Examples

Props

Timeout

The timeout property lets you customize the delay before the v-snackbar is hidden.

Variants

Use the variant and rounded prop to apply distinct look and shape to the snackbar. Transparent variants such as tonal and outlined render with a surface background to remain legible against the page.

Prepend icon

The prepend-icon prop adds an icon to the start of the snackbar.

Success
Your changes have been saved.
Network issue
Connection has been lost.
Operation is not allowed

Prepend avatar

The prepend-avatar prop adds an avatar image to the start of the snackbar.

John Leider
Hey, are you available for a quick call?

Loading

The loading prop displays a circular progress indicator in the prepend area, useful for indicating an ongoing process.

Uploading file...
Uploading successful!

Timer position

The timer prop accepts 'top' or 'bottom' to control where the progress bar is rendered. Use timer-color to change its color and reverse-timer to invert the direction.

Vertical

The vertical property allows you to stack the content of your v-snackbar.

Slots

Prepend

The prepend slot overrides the default prepend area, allowing you to customize the content beyond what is possible with simple props.

New notifications
There are new reports...

Ready for more?

Continue your learning with related content selected by the Team or move between pages by using the navigation links below.