{"id":16978674,"url":"https://github.com/srph/react-accordion","last_synced_at":"2026-04-13T18:31:16.716Z","repository":{"id":57162190,"uuid":"112815391","full_name":"srph/react-accordion","owner":"srph","description":"Build markup-agnostic accordions","archived":false,"fork":false,"pushed_at":"2017-12-19T02:38:54.000Z","size":61,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-11T14:55:39.998Z","etag":null,"topics":["accordion","library","react"],"latest_commit_sha":null,"homepage":"http://xenodochial-beaver-320a9d.netlify.com","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/srph.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":"2017-12-02T05:24:54.000Z","updated_at":"2017-12-18T14:08:33.000Z","dependencies_parsed_at":"2022-09-10T09:02:35.557Z","dependency_job_id":null,"html_url":"https://github.com/srph/react-accordion","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/srph/react-accordion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Freact-accordion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Freact-accordion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Freact-accordion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Freact-accordion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srph","download_url":"https://codeload.github.com/srph/react-accordion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Freact-accordion/sbom","scorecard":{"id":844226,"data":{"date":"2025-08-11","repo":{"name":"github.com/srph/react-accordion","commit":"f661a2c84c6773efaf3d3a50cfac229d5e0ae42f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T21:05:33.676Z","repository_id":57162190,"created_at":"2025-08-23T21:05:33.677Z","updated_at":"2025-08-23T21:05:33.677Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31766291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","library","react"],"created_at":"2024-10-14T01:43:58.848Z","updated_at":"2026-04-13T18:31:16.694Z","avatar_url":"https://github.com/srph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Accordion [![npm version](https://img.shields.io/npm/v/@srph/react-accordion.svg?style=flat-square)](https://npmjs.com/packages/@srph/react-accordion) [![Build Status](https://img.shields.io/travis/srph/react-accordion.svg?style=flat-square)](https://travis-ci.org/srph/react-accordion?branch=master)\nBuild markup-agnostic accordions\n\nView [demo](http://xenodochial-beaver-320a9d.netlify.com). View [examples](storybook/accordion.js).\n\n## Why?\nMost projects work fine. In addition, accordions are pretty simple in nature. However, this library was built for _simplicity_:\n\n- It doesn't assume markup.\n- It only handles state.\n- It provides the bare minimum to get you started.\n\n### How It Works\n\nThis library takes advantage of context to pass down data to the each pane.\n\n## Installation\n```bash\nnpm install @srph/react-accordion --save\n```\n\n### Script tags\nIf you're not using a bundler like Browserify or Webpack, simply add the script tag after your React script tag.\n\n```html\n\u003c!-- Script tags for React and other libraries --\u003e\n\u003cscript src=\"https://unpkg.com/@srph/react-accordion/dist/react-accordion.min.js\"\u003e\u003c/script\u003e\n```\n\nThis library is exposed as `ReactAccordion` (e.g., `ReactAccordion`, `ReactAccordion.AccordionButton`, `ReactAccordion.AccordionPane`).\n\n## Usage\nView [examples](storybook/accordion.js).\n\n```js\nimport React from 'react';\nimport Accordion, {AccordionPane, AccordionButton} from '@srph/react-accordion';\n\nclass App extends React.Component {\n  render() {\n    return (\n    \u003cAccordion paneClassName=\"panel\" openClassName=\"-open\"\u003e\n      \u003cAccordionPane\u003e\n        \u003cdiv className=\"heading\"\u003e\n          \u003ch4 className=\"title\"\u003eWhat does X mean?\u003c/h4\u003e\n\n          \u003cAccordionButton className=\"button\"\u003e\n            {(open) =\u003e {\n              return open ? '▼' : '▲';\n            }}\n          \u003c/AccordionButton\u003e\n        \u003c/div\u003e\n\n        \u003cdiv className=\"body\"\u003e\n          \u003cp\u003eLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n            tempor incididunt ut labore et dolore magna aliqua.\u003c/p\u003e\n        \u003c/div\u003e\n      \u003c/AccordionPane\u003e\n\n      \u003cAccordionPane\u003e\n        \u003cdiv className=\"heading\"\u003e\n          \u003ch4 className=\"title\"\u003eWhat does X mean?\u003c/h4\u003e\n\n          \u003cAccordionButton className=\"button\"\u003e\n            {(open) =\u003e {\n              return open ? '▼' : '▲';\n            }}\n          \u003c/AccordionButton\u003e\n        \u003c/div\u003e\n\n        \u003cdiv className=\"body\"\u003e\n          \u003cp\u003eLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n            tempor incididunt ut labore et dolore magna aliqua.\u003c/p\u003e\n        \u003c/div\u003e\n      \u003c/AccordionPane\u003e\n    \u003c/Accordion\u003e\n    );\n  }\n}\n\nexport default App;\n```\n\n## API Documentation\nHere's a list of props you may use to customize the component for your use-case:\n\n### Accordion\n\nAll other props are passed down to the `div` root element as usual.\n\n| Prop  | Type | Description |\n| ----- | ---- | ----------- |\n| paneClassName | `string` (required) | The classname to pass all `AccordionPane`.  |\n| openClassName | `string` | The classname to pass to the active `AccordionPane`. Defaults to `active`. |\n| defaultActive | `number` | Default open accordion. Defaults to `0`. |\n| component | `string\\|ReactElement` | Component / element to use to wrap provided children. Defaults to `div` |\n\n\u003e **NOTE**: `Accordion` wraps your provided children inside a `div`. To customize this, see the `component` prop.\n\n### AccordionPane\n\nAll other props are passed down to the `div` root element as usual.\n\n\u003e **NOTE**: `AccordionPane` ignores `className`.\n\n### AccordionButton\n\nAll other props are passed down to the `button` root element as usual.\n\n\u003e **NOTE**: `AccordionButton` ignores `onClick` and `type`.\n\n## Setup\nYou can check the [demo](http://xenodochial-beaver-320a9d.netlify.com), or build it yourself locally:\n\n```bash\nnpm install\nnpm run start\n```\n\nAfterwards, open up `localhost:9001` in your browser.\n\n### Bundling package\n```\nnpm run bundle\n```\n\n### Publish storybook\n```\nnpm run storybook:publish\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Freact-accordion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrph%2Freact-accordion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Freact-accordion/lists"}