{"id":16202305,"url":"https://github.com/panoply/relapse","last_synced_at":"2025-10-05T03:29:22.100Z","repository":{"id":37943470,"uuid":"460294213","full_name":"panoply/relapse","owner":"panoply","description":"🪗 A lightweight ESM (vanilla) toggle utility for creating dynamic collapsible components","archived":false,"fork":false,"pushed_at":"2024-08-30T07:31:53.000Z","size":2459,"stargazers_count":20,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T16:01:01.174Z","etag":null,"topics":["accordion","collapse","dropdown","toggle","typescript","vanilla"],"latest_commit_sha":null,"homepage":"https://panoply.github.io/relapse/","language":"TypeScript","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/panoply.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-02-17T05:28:39.000Z","updated_at":"2025-03-10T00:25:00.000Z","dependencies_parsed_at":"2024-01-14T17:32:32.369Z","dependency_job_id":"20f7d298-2160-42e1-a875-e62367068b1b","html_url":"https://github.com/panoply/relapse","commit_stats":{"total_commits":29,"total_committers":1,"mean_commits":29.0,"dds":0.0,"last_synced_commit":"41de87c724dbf54f18bd99c8649800190114b52f"},"previous_names":["panoply/accordion"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoply%2Frelapse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoply%2Frelapse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoply%2Frelapse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoply%2Frelapse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panoply","download_url":"https://codeload.github.com/panoply/relapse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814907,"owners_count":20352037,"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","collapse","dropdown","toggle","typescript","vanilla"],"created_at":"2024-10-10T09:46:53.650Z","updated_at":"2025-10-05T03:29:17.064Z","avatar_url":"https://github.com/panoply.png","language":"TypeScript","readme":"# Relapse\n\nAn [A11y](https://www.a11yproject.com/) compliant, full featured, lightweight (3kb gzip) and dependency free toggle utility for collapsible accordions. Written in TypeScript and distributed in ES6 this tiny little module flaunts an extensive API for usage in modern web projects.\n\nVisit Documentation: https://panoply.github.io/relapse\n\n### Key Features\n\n- Supports both semantic and sibling markup structures\n- Silky smooth transitions leveraging [WAAPI](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API)\n- Drop-in solution with no complexities, just initialize!\n- A11y compliant (accessibility support) baked into the core.\n- Functional and pure, no classes or prototype bullshit.\n- Event dispatching with global context access and persisted instances\n\n### Installation\n\nThe module is shipped for ESM consumption in the Browser.\n\n```bash\npnpm add relapse\n```\n\n# Usage\n\nRelapse requires initialization to function. The selector and option parameters are completely optional.\n\n\u003c!-- prettier-ignore --\u003e\n```js\nimport relapse from 'relapse';\n\nconst toggle = relapse('.selector', {\n  persist: false,            // Whether or not a fold should always be expanded\n  multiple: false,           // Whether or not multiple folds can be expanded\n  unique: false,             // Whether or not instance is unique\n  schema: 'data-relapse',    // Custom data attribute reference\n  fold: {\n    easing: 'ease-in-out',   // The animation easing to apply\n    duration: 200,           // Duration of the fold content transition\n  },\n  fade: {\n    duration: 120,           // Duration of the fold content transition\n    transition: 'linear',    // The easing effect to apply when fading content\n  },\n  classes: {\n    opened: 'opened',        // The class to use for opened button\n    expanded: 'expanded',    // The class to use on expanded fold\n    disabled: 'disabled'     // The class to use for disabled fold\n  }\n});\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanoply%2Frelapse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanoply%2Frelapse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanoply%2Frelapse/lists"}