Welcome Getting started Layout styles github-circle-black-transparent Source
Components
Badges
App bars
Bottom app bars Top app bars
Buttons
Common buttons FAB Icon buttons Segmented buttons
Cards Carousel Checkboxes Chips Date pickers Dialogs Forms Icons Lists Menus Navigation Progress indicators Pull to refresh Radios Search Selects
Sheets
Bottom sheets Side sheets
Sliders Snackbars Switches Tabs Text fields Time pickers Tooltips Utilities
home apps Buttons palette Two
Materially
github-circle-black-transparent

Snackbars

Snackbars provide brief messages about app processes at the bottom of the screen
Material Design Guidelines: Snackbar

Example

Show
// also available globally on window
import { mcSnackbar } from '@thewebformula/materially/services';
// import { mcSnackbar } from '@thewebformula/materially

mcSnackbar.show({
  message: 'Message goes here'
});
            
Actions
Show
// also available globally on window
import { mcSnackbar } from '@thewebformula/materially/services';
// import { mcSnackbar } from '@thewebformula/materially

// Promise will resolve when the Snackbar is dismissed automatically or when action is pressed
await mcSnackbar.show({
  message: 'Message goes here',
  action: true,
  actionLabel: 'Done' // default 'Dismiss'
});
console.log('Snackbar dismissed');
            
No close button and longer time
Show
// also available globally on window
import { mcSnackbar } from '@thewebformula/materially/services';
// import { mcSnackbar } from '@thewebformula/materially

mcSnackbar.show({
  message: 'Message goes here',
  closeButton: false,
  ms: 6000
});
            

Style

CSS variables that allow you override default values
/* Optional variables for overriding */

--mc-snackbar-container-color: var(--mc-surface-inverse);
--mc-snackbar-text-color: var(--mc-on-surface-inverse);
--mc-snackbar-action-color: var(--mc-primary-container);
            
menu home apps Get started