• Home
Name Date Size #Lines LOC

..--

.github/03-May-2024-3414

demo/03-May-2024-227189

test/03-May-2024-12582

.bower.jsonD03-May-20241.7 KiB4949

.gitignoreD03-May-202417 21

.travis.ymlD03-May-20241.7 KiB2423

CONTRIBUTING.mdD03-May-20243.4 KiB7839

README.mdD03-May-20242.5 KiB7643

bower.jsonD03-May-20241.5 KiB4140

hero.svgD03-May-20242.9 KiB5957

index.htmlD03-May-2024990 3114

paper-dialog.htmlD03-May-20243.6 KiB11839

README.md

1
2<!---
3
4This README is automatically generated from the comments in these files:
5paper-dialog.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-dialog.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-dialog)
16
17_[Demo and API docs](https://elements.polymer-project.org/elements/paper-dialog)_
18
19
20##&lt;paper-dialog&gt;
21
22Material design: [Dialogs](https://www.google.com/design/spec/components/dialogs.html)
23
24`<paper-dialog>` is a dialog with Material Design styling and optional animations when it is
25opened or closed. It provides styles for a header, content area, and an action area for buttons.
26You can use the `<paper-dialog-scrollable>` element (in its own repository) if you need a scrolling
27content area. To autofocus a specific child element after opening the dialog, give it the `autofocus`
28attribute. See `Polymer.PaperDialogBehavior` and `Polymer.IronOverlayBehavior` for specifics.
29
30For example, the following code implements a dialog with a header, scrolling content area and
31buttons. Focus will be given to the `dialog-confirm` button when the dialog is opened.
32
33```html
34<paper-dialog>
35  <h2>Header</h2>
36  <paper-dialog-scrollable>
37    Lorem ipsum...
38  </paper-dialog-scrollable>
39  <div class="buttons">
40    <paper-button dialog-dismiss>Cancel</paper-button>
41    <paper-button dialog-confirm autofocus>Accept</paper-button>
42  </div>
43</paper-dialog>
44```
45
46### Styling
47
48See the docs for `Polymer.PaperDialogBehavior` for the custom properties available for styling
49this element.
50
51### Animations
52
53Set the `entry-animation` and/or `exit-animation` attributes to add an animation when the dialog
54is opened or closed. See the documentation in
55[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation) for more info.
56
57For example:
58
59```html
60<link rel="import" href="components/neon-animation/animations/scale-up-animation.html">
61<link rel="import" href="components/neon-animation/animations/fade-out-animation.html">
62
63<paper-dialog entry-animation="scale-up-animation"
64              exit-animation="fade-out-animation">
65  <h2>Header</h2>
66  <div>Dialog body</div>
67</paper-dialog>
68```
69
70### Accessibility
71
72See the docs for `Polymer.PaperDialogBehavior` for accessibility features implemented by this
73element.
74
75
76