{"id":13780004,"url":"https://github.com/zoltantothcom/vanilla-js-accordion","last_synced_at":"2025-05-11T13:31:20.012Z","repository":{"id":2956974,"uuid":"48001319","full_name":"zoltantothcom/vanilla-js-accordion","owner":"zoltantothcom","description":"Vanilla Javascript accordion - tiny and simple.","archived":false,"fork":false,"pushed_at":"2023-04-16T22:05:06.000Z","size":2935,"stargazers_count":63,"open_issues_count":7,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-03T18:14:38.652Z","etag":null,"topics":["accordion","accordion-widget","vanilla-javascript-accordion","vanilla-js"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zoltantothcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-12-14T21:08:43.000Z","updated_at":"2024-08-01T16:16:44.000Z","dependencies_parsed_at":"2023-07-06T12:46:12.921Z","dependency_job_id":null,"html_url":"https://github.com/zoltantothcom/vanilla-js-accordion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoltantothcom%2Fvanilla-js-accordion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoltantothcom%2Fvanilla-js-accordion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoltantothcom%2Fvanilla-js-accordion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoltantothcom%2Fvanilla-js-accordion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoltantothcom","download_url":"https://codeload.github.com/zoltantothcom/vanilla-js-accordion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225056756,"owners_count":17414202,"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":["accordion","accordion-widget","vanilla-javascript-accordion","vanilla-js"],"created_at":"2024-08-03T18:01:11.340Z","updated_at":"2024-11-17T15:30:49.547Z","avatar_url":"https://github.com/zoltantothcom.png","language":"JavaScript","funding_links":[],"categories":["Components"],"sub_categories":["Accordion"],"readme":"# Vanilla JavaScript accordion\n\n[![Build Status](https://travis-ci.org/zoltantothcom/vanilla-js-accordion.svg?branch=master)](https://travis-ci.org/zoltantothcom/vanilla-js-accordion) [![Coverage Status](https://coveralls.io/repos/github/zoltantothcom/vanilla-js-accordion/badge.svg?branch=master)](https://coveralls.io/github/zoltantothcom/vanilla-js-accordion?branch=master) ![Dependencies](https://img.shields.io/badge/dependencies-none-brightgreen.svg)\n\nVanilla JavaScript accordion - accessible and super tiny (_**~400 bytes gzipped**_).\n\n*— Inspired by the blazing fast, lightweight, cross-platform and crazy popular [Vanilla JS](http://vanilla-js.com/)  framework.*\n\n\n## Demo\n\n[**ACCORDION**](http://zoltantothcom.github.io/vanilla-js-accordion)\n\n\n## Options\n\nOption | Type | Default | Description\n------ | ---- | ------- | -----------\nelement | string or object |  | *id* of the accordion container or the DOM element\nopenTab | int  |  | Accordion tab to start open with. If not defined all tabs closed.\noneOpen | boolean | false | Only one accordion tab can be open at a time.\n\n\n## Methods\n\nMethod | Argument | Description\n------ | -------- | -----------\n.close(index) | index: int | Closes the accordion tab by index\n.open(index) | index: int | Opens the accordion tab by index\n.destroy() | | Removes the event listener\n\n\n## Usage example\n\n```javascript\nvar accordion = new Accordion({\n    element: 'accordion',\n    openTab: 2,\n    oneOpen: true\n});\n```\n\n\n## Running the tests\n\n```\nnpm test\n```\n\n\n## Browser support and dependencies\n\nBrowser | Support | Dependencies\n------ | -------- | -----------\nChrome | yes | -\nFirefox | yes | -\nSafari | yes | -\nOpera | yes | -\nIE | yes* | [Polyfill](//cdn.jsdelivr.net/classlist/2014.01.31/classList.min.js) for `.classList` in IE9\n\n\\* _IE9 and up_\n\n\n## License\n\nAnyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.\n\nSee [Unlicense](http://unlicense.org) for full details.\n\n\n## Related\n\n* [Vanilla JavaScript **Carousel**](https://github.com/zoltantothcom/vanilla-js-carousel)\n* [Vanilla JavaScript **Dropdown**](https://github.com/zoltantothcom/vanilla-js-dropdown)\n* [Vanilla JavaScript **Tabs**](https://github.com/zoltantothcom/vanilla-js-tabs)\n* [Vanilla JavaScript **Tooltip**](https://github.com/zoltantothcom/vanilla-js-tooltip)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoltantothcom%2Fvanilla-js-accordion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoltantothcom%2Fvanilla-js-accordion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoltantothcom%2Fvanilla-js-accordion/lists"}