{"id":16955816,"url":"https://github.com/yoannfleurydev/react-use-disclosure","last_synced_at":"2025-03-17T08:37:29.186Z","repository":{"id":37825444,"uuid":"219572973","full_name":"yoannfleurydev/react-use-disclosure","owner":"yoannfleurydev","description":"⚛️  Custom React Hook to handle open/close/toggle of a state.","archived":false,"fork":false,"pushed_at":"2025-02-17T18:22:43.000Z","size":2628,"stargazers_count":37,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-27T21:37:44.506Z","etag":null,"topics":["disclosure","hooks","modal","react","react-hooks","toggle","tooltip"],"latest_commit_sha":null,"homepage":"","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/yoannfleurydev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"yoannfleurydev","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://paypal.me/yoannfleurydev"]}},"created_at":"2019-11-04T18:49:22.000Z","updated_at":"2025-02-17T18:22:45.000Z","dependencies_parsed_at":"2023-02-19T06:15:37.405Z","dependency_job_id":"fe9eacc8-3f78-45d9-aa82-c37c47bb6816","html_url":"https://github.com/yoannfleurydev/react-use-disclosure","commit_stats":null,"previous_names":["yoannfleurydev/usedisclosure"],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannfleurydev%2Freact-use-disclosure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannfleurydev%2Freact-use-disclosure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannfleurydev%2Freact-use-disclosure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannfleurydev%2Freact-use-disclosure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoannfleurydev","download_url":"https://codeload.github.com/yoannfleurydev/react-use-disclosure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852499,"owners_count":20358271,"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":["disclosure","hooks","modal","react","react-hooks","toggle","tooltip"],"created_at":"2024-10-13T22:13:23.704Z","updated_at":"2025-03-17T08:37:28.796Z","avatar_url":"https://github.com/yoannfleurydev.png","language":"JavaScript","funding_links":["https://ko-fi.com/yoannfleurydev","https://paypal.me/yoannfleurydev"],"categories":[],"sub_categories":[],"readme":"# useDisclosure\n\n![Node CI](https://github.com/yoannfleurydev/useDisclosure/workflows/Node%20CI/badge.svg)\n\n`useDiclosure` is a React custom hook to perform common open/close behavior on\nmodals, tooltips etc.\n\n## 🔧 Installation\n\n```sh\n# Using yarn.\nyarn add react-use-disclosure\n\n# Using npm.\nnpm install react-use-disclosure\n```\n\n## 🔎 Usage\n\nAs `useDisclosure` return an object, you can get the key that you want:\n\n```jsx\n// At the top of your file.\nimport { useDisclosure } from \"react-use-disclosure\";\n\n// Then, in your component.\nconst {\n  isOpen: isModalOpen,\n  open: openModal,\n  close: closeModal\n} = useDisclosure();\n\nconst { isOpen: isTooltipOpen, toggle: toggleTooltip } = useDiclosure(true);\n\n// For the example, but the default value is false.\nconst { isOpen, open, close, toggle } = useDisclosure(false);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoannfleurydev%2Freact-use-disclosure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoannfleurydev%2Freact-use-disclosure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoannfleurydev%2Freact-use-disclosure/lists"}