@mkazlauskas/isw-snackbar

2.5.0 • Public • Published

<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();
}

Readme

Keywords

none

Package Sidebar

Install

npm i @mkazlauskas/isw-snackbar

Weekly Downloads

2

Version

2.5.0

License

SEE LICENSE IN LICENSE

Unpacked Size

44.1 kB

Total Files

10

Last publish

Collaborators

  • mkazlauskas