{"id":15046845,"url":"https://github.com/polymerelements/iron-dropdown","last_synced_at":"2025-04-05T08:08:54.252Z","repository":{"id":32736760,"uuid":"36327069","full_name":"PolymerElements/iron-dropdown","owner":"PolymerElements","description":"An unstyled element that works similarly to a native browser select","archived":false,"fork":false,"pushed_at":"2023-10-16T14:02:52.000Z","size":513,"stargazers_count":34,"open_issues_count":18,"forks_count":50,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-05-09T10:09:27.069Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.webcomponents.org/element/PolymerElements/iron-dropdown","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PolymerElements.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-26T22:19:20.000Z","updated_at":"2024-06-18T13:47:08.214Z","dependencies_parsed_at":"2024-06-18T13:56:59.171Z","dependency_job_id":null,"html_url":"https://github.com/PolymerElements/iron-dropdown","commit_stats":{"total_commits":169,"total_committers":22,"mean_commits":7.681818181818182,"dds":0.680473372781065,"last_synced_commit":"daa603c091cd432a15cb999a6005fdf9dfdec73a"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-dropdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-dropdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-dropdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerElements%2Firon-dropdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PolymerElements","download_url":"https://codeload.github.com/PolymerElements/iron-dropdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305935,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T20:53:39.244Z","updated_at":"2025-04-05T08:08:54.231Z","avatar_url":"https://github.com/PolymerElements.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Published on NPM](https://img.shields.io/npm/v/@polymer/iron-dropdown.svg)](https://www.npmjs.com/package/@polymer/iron-dropdown)\n[![Build status](https://travis-ci.org/PolymerElements/iron-dropdown.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-dropdown)\n[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://webcomponents.org/element/@polymer/iron-dropdown)\n\n## \u0026lt;iron-dropdown\u0026gt;\n\n`\u003ciron-dropdown\u003e` displays content inside a fixed-position container,\npositioned relative to another element.\n\nSee: [Documentation](https://www.webcomponents.org/element/@polymer/iron-dropdown),\n [Demo](https://www.webcomponents.org/element/@polymer/iron-dropdown/demo/demo/index.html).\n\n## Usage\n\n### Installation\n\n```\nnpm install --save @polymer/iron-dropdown\n```\n\n### In an HTML file\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cscript type=\"module\"\u003e\n      import '@polymer/iron-dropdown/iron-dropdown.js';\n    \u003c/script\u003e\n    \u003cstyle\u003e\n      #container {\n        display: inline-block;\n      }\n\n      iron-dropdown {\n        border: 1px solid gray;\n        background: white;\n        font-size: 2em;\n      }\n    \u003c/style\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv id=\"container\"\u003e\n      \u003cbutton onclick=\"dropdown.open();\"\u003eopen the iron-dropdown\u003c/button\u003e\n      \u003ciron-dropdown id=\"dropdown\" no-overlap\u003e\n        \u003cdiv slot=\"dropdown-content\"\u003eHello!\u003c/div\u003e\n      \u003c/iron-dropdown\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### In a Polymer 3 element\n\n```js\nimport {PolymerElement, html} from '@polymer/polymer';\nimport '@polymer/iron-dropdown/iron-dropdown.js';\n\nclass SampleElement extends PolymerElement {\n  static get template() {\n    return html`\n      \u003cstyle\u003e\n        :host {\n          display: inline-block;\n        }\n\n        iron-dropdown {\n          border: 1px solid gray;\n          background: white;\n          font-size: 2em;\n        }\n      \u003c/style\u003e\n      \u003cbutton on-click=\"_openDropdown\"\u003eopen the dropdown\u003c/button\u003e\n      \u003ciron-dropdown id=\"dropdown\" horizontal-align=\"right\" vertical-align=\"top\"\u003e\n        \u003cdiv slot=\"dropdown-content\"\u003eHello!\u003c/div\u003e\n      \u003c/iron-dropdown\u003e\n    `;\n  }\n\n  _openDropdown() {\n    this.$.dropdown.open();\n  }\n}\ncustomElements.define('sample-element', SampleElement);\n```\n\nIn the above example, the `\u003cdiv\u003e` assigned to the `dropdown-content` slot will\nbe hidden until the dropdown element has `opened` set to true, or when the\n`open` method is called on the element.\n\n## Contributing\n\nIf you want to send a PR to this element, here are the instructions for running\nthe tests and demo locally:\n\n### Installation\n\n```sh\ngit clone https://github.com/PolymerElements/iron-dropdown\ncd iron-dropdown\nnpm install\nnpm install -g polymer-cli\n```\n\n### Running the demo locally\n\n```sh\npolymer serve --npm\nopen http://127.0.0.1:\u003cport\u003e/demo/\n```\n\n### Running the tests\n\n```sh\npolymer test --npm\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolymerelements%2Firon-dropdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolymerelements%2Firon-dropdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolymerelements%2Firon-dropdown/lists"}