{"id":22106998,"url":"https://github.com/legitcode/accordion","last_synced_at":"2025-03-24T03:17:16.126Z","repository":{"id":95859046,"uuid":"42910442","full_name":"Legitcode/accordion","owner":"Legitcode","description":"A simple accordion component based on Thoughbot's accordion in refills","archived":false,"fork":false,"pushed_at":"2015-11-17T02:22:55.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-29T09:31:01.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Legitcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-22T04:01:43.000Z","updated_at":"2019-03-08T20:38:14.000Z","dependencies_parsed_at":"2023-03-09T15:45:33.461Z","dependency_job_id":null,"html_url":"https://github.com/Legitcode/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/Legitcode%2Faccordion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legitcode%2Faccordion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legitcode%2Faccordion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legitcode%2Faccordion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Legitcode","download_url":"https://codeload.github.com/Legitcode/accordion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245200706,"owners_count":20576674,"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-12-01T08:13:33.350Z","updated_at":"2025-03-24T03:17:16.049Z","avatar_url":"https://github.com/Legitcode.png","language":"JavaScript","readme":"#accordion\n\nA simple React accordion component based on Thoughtbots Refills accordion component\n\n##Install\n\n```bash\nnpm install legit-accordion --save\n```\n\n##Example\n\n```js\nimport { Accordion, AccordionItem } from 'legit-accordion';\n\n// Import the default styling.\nrequire('legit-accordion/lib/default');\n\nexport default class Component extends React.component {\n  render() {\n    return (\n      // Optionally specificy an accordion element by name to be active. If\n      // left out, all accordions will be closed\n      \u003cAccordion active='Item 1'\u003e\n        \u003cAccordionItem name='Item 1'\u003e\n          \u003cp\u003eThis is an accordion item. The first.\u003c/p\u003e\n        \u003c/AccordionItem\u003e\n    \n        \u003cAccordionItem name='Item 2'\u003e\n          \u003cp\u003eThis is another accordion item. The second.\u003c/p\u003e\n        \u003c/AccordionItem\u003e \n      \u003c/Accordion\u003e\n    )\n  }\n}\n```\n\nIf you'd like to override the HTML that is displayed on the closed accordion\nyou can use the `labelHTML` prop:\n\n```js\n\u003cAccordionItem name='Item 1' labelHTML={\u003cspan\u003eItem 1\u003c/span\u003e}\u003e\n  \u003cp\u003eThis is an accordion item with a fancy label\u003c/p\u003e\n\u003c/AccordionItem\u003e\n```\n\nThat's it! The caveat here is that the open and close animations depend on the \n`max-height` property, which is by default set to 500px. If your content is going\nto be taller than that, you can override this:\n\n```css\n.accordion .is-expanded \u003e div.content {\n  max-height: 1000px;\n}\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegitcode%2Faccordion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flegitcode%2Faccordion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegitcode%2Faccordion/lists"}