{"id":15837018,"url":"https://github.com/afeiship/visible-element","last_synced_at":"2026-05-02T11:33:26.233Z","repository":{"id":96088221,"uuid":"124024866","full_name":"afeiship/visible-element","owner":"afeiship","description":"Visible element with animation.","archived":false,"fork":false,"pushed_at":"2024-05-28T10:27:09.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-07T10:45:30.705Z","etag":null,"topics":["backdrop","close","element","hide","overlay","react","show","ui","visible","vue"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2018-03-06T05:18:46.000Z","updated_at":"2024-05-28T10:27:13.000Z","dependencies_parsed_at":"2024-10-26T22:05:48.315Z","dependency_job_id":"1941d20f-3019-4715-a2b5-f9e8575f775a","html_url":"https://github.com/afeiship/visible-element","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"c606d0bbe4acca7297492ef6d9c12ad322014ac4"},"previous_names":["afeiship/visible-element"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fvisible-element","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fvisible-element/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fvisible-element/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fvisible-element/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/visible-element/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246670947,"owners_count":20815066,"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":["backdrop","close","element","hide","overlay","react","show","ui","visible","vue"],"created_at":"2024-10-05T15:20:30.141Z","updated_at":"2026-05-02T11:33:26.194Z","avatar_url":"https://github.com/afeiship.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# visible-element\n\u003e Visible element with animation.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```shell\nnpm install @jswork/visible-element\n```\n\n## usage\n```html\n\u003cdiv id=\"my-element\" data-visible=\"false\"\u003e\u003c/div\u003e\n\u003cbutton id=\"my-button\"\u003eToggle\u003c/button\u003e\n```\n```css\n[hidden] {\n  display: none;\n}\n\n#my-element {\n  animation: show 0.3s ease-in-out;\n}\n\n#my-element[data-visible=\"true\"] {\n  animation: close 0.3s ease-in-out;\n}\n\n@keyframes show {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n  }\n}\n@keyframes close {\n  from {\n    opacity: 1;\n  }\n  to {\n    opacity: 0;\n  }\n}\n```\n\n```javascript\nimport VisibleElement from 'visible-element';\nconst element = document.getElementById('my-element');\nconst button = document.getElementById('my-button');\nconst visible = new VisibleElement(element, {\n  onShow: () =\u003e { console.log('show'); },\n  onShowed: () =\u003e { console.log('showed'); },\n  onClose: () =\u003e { console.log('close'); },\n  onClosed: () =\u003e { console.log('closed'); },\n  onChange: (status) =\u003e { console.log(status); },\n});\nbutton.addEventListener('click', () =\u003e {\n  visible.toggle();\n});\n```\n## license\nCode released under [the MIT license](https://github.com/afeiship/visible-element/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/visible-element\n[version-url]: https://npmjs.org/package/@jswork/visible-element\n\n[license-image]: https://img.shields.io/npm/l/@jswork/visible-element\n[license-url]: https://github.com/afeiship/visible-element/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/visible-element\n[size-url]: https://github.com/afeiship/visible-element/blob/master/dist/index.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/visible-element\n[download-url]: https://www.npmjs.com/package/@jswork/visible-element\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fvisible-element","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Fvisible-element","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fvisible-element/lists"}