{"_id":"@aayusht200/isdropdown","_rev":"2-b020a190f564365a6d9dc095253b6bd8","name":"@aayusht200/isdropdown","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@aayusht200/isdropdown","version":"1.0.0","keywords":["dropdown","ui","vanilla-js","component","frontend"],"author":{"name":"Aayush Trivedi"},"license":"ISC","_id":"@aayusht200/isdropdown@1.0.0","maintainers":[{"name":"aayusht200","email":"aayush.t200@gmail.com"}],"homepage":"https://github.com/aayusht200/isDropdown#readme","bugs":{"url":"https://github.com/aayusht200/isDropdown/issues"},"dist":{"shasum":"a7915c46228004fd1a59c993a4481876c95125c9","tarball":"https://registry.npmjs.org/@aayusht200/isdropdown/-/isdropdown-1.0.0.tgz","fileCount":2,"integrity":"sha512-A2LziWhYKOtxZve8oMG/ke4Ug/wCtVygyVClNjO1CNUEXi7EWM6rk4PZqGtkzBSlbfQEyBfRL5tBbcDOQ+6F+g==","signatures":[{"sig":"MEUCIQCquEjX4HYVFZExu7r5cXrMLP+es8Z9w86Lqk4dNyJkdgIgZvXhg06y0XZC3k71v5XKjIAaGjOphpS99mNDSeXgum4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1433},"main":"index.js","type":"module","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"aayusht200","email":"aayush.t200@gmail.com"},"repository":{"url":"git+https://github.com/aayusht200/isDropdown.git","type":"git"},"_npmVersion":"11.6.1","description":"A lightweight reusable dropdown toggle utility written in vanilla JavaScript.","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/isdropdown_1.0.0_1762960839238_0.5670854807970325","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aayusht200/isdropdown","version":"1.0.1","description":"A lightweight reusable dropdown toggle utility written in vanilla JavaScript.","keywords":["dropdown","ui","vanilla-js","component","frontend"],"homepage":"https://github.com/aayusht200/isDropdown#readme","bugs":{"url":"https://github.com/aayusht200/isDropdown/issues"},"repository":{"type":"git","url":"git+https://github.com/aayusht200/isDropdown.git"},"license":"ISC","author":{"name":"Aayush Trivedi"},"type":"module","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"3e6f2ca6b16748a6ba95faf6272056b586565aa8","_id":"@aayusht200/isdropdown@1.0.1","_nodeVersion":"22.16.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-662e6Ccaa9eTGmO4vN51+7+WOK8S9oDxwazPcaID+Ihka0ngHd22xS99F7b20UH2nUeg0n0IU4Szrmpxwmmu9Q==","shasum":"c22f2488f858e21ebf88f0c0f5e31325221683de","tarball":"https://registry.npmjs.org/@aayusht200/isdropdown/-/isdropdown-1.0.1.tgz","fileCount":3,"unpackedSize":3193,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDQZ9qaSQRxd9t5ugcHEOjZIAc8JeT+WpXHFfIkJuSYMgIhAKK5QAVuTPxZqiQ6wB0QzO7cQH5sgHASE4kjtEbmBSZI"}]},"_npmUser":{"name":"aayusht200","email":"aayush.t200@gmail.com"},"directories":{},"maintainers":[{"name":"aayusht200","email":"aayush.t200@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/isdropdown_1.0.1_1762961581079_0.3891415722980276"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-12T15:20:39.121Z","modified":"2025-11-12T15:33:01.746Z","1.0.0":"2025-11-12T15:20:39.386Z","1.0.1":"2025-11-12T15:33:01.254Z"},"bugs":{"url":"https://github.com/aayusht200/isDropdown/issues"},"author":{"name":"Aayush Trivedi"},"license":"ISC","homepage":"https://github.com/aayusht200/isDropdown#readme","keywords":["dropdown","ui","vanilla-js","component","frontend"],"repository":{"type":"git","url":"git+https://github.com/aayusht200/isDropdown.git"},"description":"A lightweight reusable dropdown toggle utility written in vanilla JavaScript.","maintainers":[{"name":"aayusht200","email":"aayush.t200@gmail.com"}],"readme":"# isDropdown\n\n[![npm version](https://img.shields.io/npm/v/@aayusht200/isdropdown.svg)](https://www.npmjs.com/package/@aayusht200/isdropdown)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nA simple, dependency-free JavaScript utility to enable dropdown toggling behavior for your UI.\n\n---\n\n## Installation\n\nUsing npm:\n\n```bash\nnpm i @aayusht200/isdropdown\n```\n\n---\n\n## Usage\n\nAdd required data attributes to your HTML:\n\n```html\n<div data-dropdown>\n  <button data-dropdown-button>Toggle Dropdown</button>\n  <div class=\"dropdown-content\">\n    <!-- Dropdown content here -->\n  </div>\n</div>\n```\n\nThen, use the package in your JavaScript:\n\n```javascript\nimport { isDropdown } from '@aayusht200/isdropdown';\n\n// Initialize dropdown toggle behavior\nisDropdown();\n```\n\nOr with a standard `<script>` tag:\n\n```html\n<script src=\"path/to/isDropdown.js\"></script>\n<script>\n  isDropdown();\n</script>\n```\n\n---\n\n## How it Works\n\n- Assign `[data-dropdown]` to the wrapper containing your dropdown content.\n- Assign `[data-dropdown-button]` to the button within that wrapper which opens/closes the dropdown.\n\nClicking the button toggles the `'active'` class on your `[data-dropdown]` element.  \nClicking elsewhere closes any open dropdowns.\n\n### Example CSS\n\n```css\n[data-dropdown] .dropdown-content {\n  display: none;\n}\n\n[data-dropdown].active .dropdown-content {\n  display: block;\n}\n```\n\n---\n\n## API\n\n### `isDropdown()`\n\n- Initializes the dropdown logic on the document.\n- No parameters needed.\n\n---\n\n## License\n\nMIT\n\n---\n\n**NPM:** [@aayusht200/isdropdown](https://www.npmjs.com/package/@aayusht200/isdropdown)  \n**GitHub:** [aayusht200/isDropdown](https://github.com/aayusht200/isDropdown)\n","readmeFilename":"README.md"}