Name Date Size #Lines LOC

..--

.github/H25-Apr-2025-3414

demo/H25-Apr-2025-9770

test/H25-Apr-2025-276213

.bower.jsonH A D25-Apr-20251.4 KiB4545

.gitignoreH A D25-Apr-202517 21

.travis.ymlH A D25-Apr-2025784 2524

CONTRIBUTING.mdH A D25-Apr-20253.4 KiB7839

README.mdH A D25-Apr-20251.9 KiB7336

bower.jsonH A D25-Apr-20251.1 KiB3635

hero.svgH A D25-Apr-2025805 2119

index.htmlH A D25-Apr-2025867 2712

paper-toast.htmlH A D25-Apr-20259.4 KiB324235

README.md

1
2<!---
3
4This README is automatically generated from the comments in these files:
5paper-toast.html
6
7Edit those files, and our readme bot will duplicate them over here!
8Edit this file, and the bot will squash your changes :)
9
10The bot does some handling of markdown. Please file a bug if it does the wrong
11thing! https://github.com/PolymerLabs/tedium/issues
12
13-->
14
15[![Build status](https://travis-ci.org/PolymerElements/paper-toast.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-toast)
16
17_[Demo and API docs](https://elements.polymer-project.org/elements/paper-toast)_
18
19
20##&lt;paper-toast&gt;
21
22Material design: [Snackbars & toasts](https://www.google.com/design/spec/components/snackbars-toasts.html)
23
24`paper-toast` provides a subtle notification toast. Only one `paper-toast` will
25be visible on screen.
26
27Use `opened` to show the toast:
28
29Example:
30
31```html
32<paper-toast text="Hello world!" opened></paper-toast>
33```
34
35Also `open()` or `show()` can be used to show the toast:
36
37Example:
38
39```html
40<paper-button on-click="openToast">Open Toast</paper-button>
41<paper-toast id="toast" text="Hello world!"></paper-toast>
42
43...
44
45openToast: function() {
46  this.$.toast.open();
47}
48```
49
50Set `duration` to 0, a negative number or Infinity to persist the toast on screen:
51
52Example:
53
54```html
55<paper-toast text="Terms and conditions" opened duration="0">
56  <a href="#">Show more</a>
57</paper-toast>
58```
59
60### Styling
61
62The following custom properties and mixins are available for styling:
63
64| Custom property | Description | Default |
65| --- | --- | --- |
66| `--paper-toast-background-color` | The paper-toast background-color | `#323232` |
67| `--paper-toast-color` | The paper-toast color | `#f1f1f1` |
68
69This element applies the mixin `--paper-font-common-base` but does not import `paper-styles/typography.html`.
70In order to apply the `Roboto` font to this element, make sure you've imported `paper-styles/typography.html`.
71
72
73