{"id":13397983,"url":"https://github.com/Twikito/easy-toggle-state","last_synced_at":"2025-03-14T00:32:55.393Z","repository":{"id":41308848,"uuid":"124444509","full_name":"Twikito/easy-toggle-state","owner":"Twikito","description":"A tiny JavaScript library to easily toggle the state of any HTML element in any contexts, and create UI components in no time.","archived":false,"fork":false,"pushed_at":"2021-07-26T04:21:29.000Z","size":8034,"stargazers_count":281,"open_issues_count":17,"forks_count":35,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-09-19T02:39:11.529Z","etag":null,"topics":["checkbox","css","dropdown","javascript","lightboxes","navigation-buttons","radio","switch","tabs","toggle","tooltip","tooltips","trigger-element","ui-components"],"latest_commit_sha":null,"homepage":"https://twikito.github.io/easy-toggle-state/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Twikito.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}},"created_at":"2018-03-08T20:29:33.000Z","updated_at":"2024-06-01T06:59:32.000Z","dependencies_parsed_at":"2022-09-05T13:41:22.834Z","dependency_job_id":null,"html_url":"https://github.com/Twikito/easy-toggle-state","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Twikito%2Feasy-toggle-state","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Twikito%2Feasy-toggle-state/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Twikito%2Feasy-toggle-state/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Twikito%2Feasy-toggle-state/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Twikito","download_url":"https://codeload.github.com/Twikito/easy-toggle-state/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243505163,"owners_count":20301565,"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":["checkbox","css","dropdown","javascript","lightboxes","navigation-buttons","radio","switch","tabs","toggle","tooltip","tooltips","trigger-element","ui-components"],"created_at":"2024-07-30T18:01:59.847Z","updated_at":"2025-03-14T00:32:51.869Z","avatar_url":"https://github.com/Twikito.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# [![Easy Toggle State](https://raw.githubusercontent.com/Twikito/easy-toggle-state/master/logo.png)](https://twikito.github.io/easy-toggle-state/)\n\n__A tiny JavaScript library to easily toggle the state of any HTML element in any contexts, and create UI components in no time.__\n\nDropdown, navigation button, tooltip, collapsible panel, lightbox, tabs, switches…\nUI components made in minutes without worried about JavaScript. Only set a few HTML attributes, and code the rest with your CSS skills.\n\nSee some examples in [the documentation](https://twikito.github.io/easy-toggle-state/#examples).\n\n## Status\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/Twikito/easy-toggle-state?style=flat-square)](https://github.com/Twikito/easy-toggle-state/releases)\n[![npm](https://img.shields.io/npm/v/easy-toggle-state?style=flat-square)](https://www.npmjs.com/package/easy-toggle-state)\n[![Cdnjs](https://img.shields.io/cdnjs/v/easy-toggle-state?style=flat-square)](https://cdnjs.com/libraries/easy-toggle-state)\n[![npm bundle size](https://img.shields.io/bundlephobia/min/easy-toggle-state?style=flat-square)](https://github.com/Twikito/easy-toggle-state/blob/master/dist/easy-toggle-state.min.js)\n[![npm bundle size](https://img.shields.io/bundlephobia/minzip/easy-toggle-state?style=flat-square)](https://github.com/Twikito/easy-toggle-state/blob/master/dist/easy-toggle-state.min.js)\n\n[![David](https://img.shields.io/david/Twikito/easy-toggle-state?style=flat-square)](https://david-dm.org/Twikito/easy-toggle-state)\n[![David](https://img.shields.io/david/dev/Twikito/easy-toggle-state?style=flat-square)](https://david-dm.org/Twikito/easy-toggle-state?type=dev)\n\n## Why?\n\nA front-end developer often has to __code scripts for interface components__. Components such as drop-downs, navigation buttons, tooltips, expandable panels, lightboxes, tabs, etc.\n\nThe thing is… Most of these components expose a __recurrent behavior__: a trigger element toggles the state of one or more target elements. So why not code this behavior once and for all?\n\nSo here is a solution: __a simple script to toggle the state of a trigger element__ with a CSS class. You can then __associate this element__ with one or more others: let's call them targets. By adding the right HTML attributes, it can __adapt to any contexts__ and behave like a chosen component.\n\n__Only focus on adjusting the rest with your CSS creativity__.\n\n## Quick start\n\nSeveral quick start options are available:\n\n- [Direct download](https://rawgit.com/Twikito/easy-toggle-state/master/dist/easy-toggle-state.min.js)\n- Choose another version: [ES5 or ES6](https://github.com/Twikito/easy-toggle-state/tree/master/dist)\n- [Link from cdnjs](https://cdnjs.com/libraries/easy-toggle-state)\n- Install with [npm](https://www.npmjs.com/package/easy-toggle-state): `npm install easy-toggle-state`\n\n## Documentation\n\nEasy Toggle State's full documentation is hosted on GitHub Pages at [twikito.github.io/easy-toggle-state/](https://twikito.github.io/easy-toggle-state/).\n\n## Contribution\n\n- Clone the repo: `git clone https://github.com/twikito/easy-toggle-state.git`\n- Development: `npm run build`\n- [Fork repository on GitHub](https://github.com/Twikito/easy-toggle-state/fork)\n- [Report a bug](https://github.com/Twikito/easy-toggle-state/issues)\n- [Suggest a feature](https://github.com/Twikito/easy-toggle-state/issues)\n\n## License\n\nMIT. Copyright (c) [Matthieu Bué](https://twikito.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTwikito%2Feasy-toggle-state","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTwikito%2Feasy-toggle-state","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTwikito%2Feasy-toggle-state/lists"}