Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
.github/ | 03-May-2024 | - | 34 | 14 | ||
demo/ | 03-May-2024 | - | 227 | 189 | ||
test/ | 03-May-2024 | - | 125 | 82 | ||
.bower.json | D | 03-May-2024 | 1.7 KiB | 49 | 49 | |
.gitignore | D | 03-May-2024 | 17 | 2 | 1 | |
.travis.yml | D | 03-May-2024 | 1.7 KiB | 24 | 23 | |
CONTRIBUTING.md | D | 03-May-2024 | 3.4 KiB | 78 | 39 | |
README.md | D | 03-May-2024 | 2.5 KiB | 76 | 43 | |
bower.json | D | 03-May-2024 | 1.5 KiB | 41 | 40 | |
hero.svg | D | 03-May-2024 | 2.9 KiB | 59 | 57 | |
index.html | D | 03-May-2024 | 990 | 31 | 14 | |
paper-dialog.html | D | 03-May-2024 | 3.6 KiB | 118 | 39 |
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##<paper-dialog> 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