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

[ This description is mirrored from README.md at github.com/IswPolymerElements/isw-snackbar on 2019-05-10 ]

<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.

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

The element uses the isw-responsive-behavior, so its appearance can be controlled by setting the device attribute...

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

... or get responsive by combining with isw-responsive

<isw-responsive
    device="{{device}}">
</isw-responsive>

<isw-snackbar device="[[device]]"></isw-snackbar>

Install

Link to this version
ImportedReleased 25 September 2017Other
Framework Support
Polymer 2.0+
Browser Compatibility
Install with
Release notes - Version 1.0.4

Dependencies

Polymer/polymer#^2.0.0

  • PolymerElements/iron-flex-layout#^2.0.0
  • PolymerElements/iron-overlay-behavior#^2.0.0
  • IswPolymerElements/isw-responsive