Directory

← Back

isw-snackbar

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

Author

Rating

Popularity

<100

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

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Dependencies

Polymer/polymer#^2.0.0

  • PolymerElements/iron-flex-layout#^2.0.0
  • PolymerElements/iron-overlay-behavior#^2.0.0
  • IswPolymerElements/isw-responsive
Released
2017-09-25
Maturity
IMPORTED
License
Other

Compatibility

Framework
Polymer 2.0+
Browser
Browser Independent

isw-snackbar - Vaadin Add-on Directory

Material Design Polymer 2.0 Snackbar / Toast, stacking context safe with remote-control. isw-snackbar - Vaadin Add-on Directory
**[ This description is mirrored from README.md at [github.com/IswPolymerElements/isw-snackbar](https://github.com//IswPolymerElements/isw-snackbar/blob/1.0.4/README.md) on 2019-05-10 ]** # \ 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. ```html ``` It can be accessed from multiple remotes. ```html ``` ```javascript 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... ```html ``` ```html ``` ... or get responsive by combining with `isw-responsive` ```html ```
Online