• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2<!---
3
4This README is automatically generated from the comments in these files:
5iron-dropdown.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/iron-dropdown.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-dropdown)
16
17_[Demo and API docs](https://elements.polymer-project.org/elements/iron-dropdown)_
18
19
20##&lt;iron-dropdown&gt;
21
22`<iron-dropdown>` is a generalized element that is useful when you have
23hidden content (`.dropdown-content`) that is revealed due to some change in
24state that should cause it to do so.
25
26Note that this is a low-level element intended to be used as part of other
27composite elements that cause dropdowns to be revealed.
28
29Examples of elements that might be implemented using an `iron-dropdown`
30include comboboxes, menubuttons, selects. The list goes on.
31
32The `<iron-dropdown>` element exposes attributes that allow the position
33of the `.dropdown-content` relative to the `.dropdown-trigger` to be
34configured.
35
36```html
37<iron-dropdown horizontal-align="right" vertical-align="top">
38  <div class="dropdown-content">Hello!</div>
39</iron-dropdown>
40```
41
42In the above example, the `<div>` with class `.dropdown-content` will be
43hidden until the dropdown element has `opened` set to true, or when the `open`
44method is called on the element.
45
46
47