Skip to content

Material Design Polymer 2.0 Snackbar / Toast, stacking context safe with remote-control.

License

Notifications You must be signed in to change notification settings

firmfirm/isw-snackbar

 
 

Repository files navigation

<isw-snackbar>

Material Design Polymer 2.0 Snackbar / Toast, stacking context safe with remote-control.

Place your snackbar somewhere save from stacking-context issues, and access it over a remote element in your view.

The snackbar can be switched between "mobile" and "tablet" / "desktop" styling via device and gets responsive with isw-responsive-behavior.

An open call to an allready opened snackbar closes and opens it again, multiple calls are queued.

Only one snackbar is needed, e.g. placed in the app.

<isw-snackbar device="tablet"></isw-snackbar>

It can be accessed from multiple remotes.

<isw-snackbar-remote
    id="firstSnackbar"
    message="My First Snackbar"
    duration="5000">
</isw-snackbar-remote>
<isw-snackbar-remote
    id="secondSnackbar"
    message="My Second Snackbar"
    duration="2000">
</isw-snackbar-remote>
openFirstSnackbar() {
  this.$.firstSnackbar.open();
}
openSecondSnackbar() {
  this.$.secondSnackbar.open();
}

About

Material Design Polymer 2.0 Snackbar / Toast, stacking context safe with remote-control.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 100.0%