{"_id":"@emmanuel-saleem/moving-button","_rev":"2-149dc53fd74fdab9920885721590500b","name":"@emmanuel-saleem/moving-button","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@emmanuel-saleem/moving-button","version":"1.0.0","_id":"@emmanuel-saleem/moving-button@1.0.0","maintainers":[{"name":"emmanuel-saleem","email":"emmanuelsaleem098765@gmail.com"}],"dist":{"shasum":"36c86fffc0cbdc3a389719efecc2ec77af454ad4","tarball":"https://registry.npmjs.org/@emmanuel-saleem/moving-button/-/moving-button-1.0.0.tgz","fileCount":6,"integrity":"sha512-0oMTthSD+ob+hlqSpLQzilwGhDqZUMmKmD7NVJj23mQZtdedT7QlvG+QWBx0JC4a7onVsx5yw4BFoN+3I3DAhg==","signatures":[{"sig":"MEUCIQC77kwanSOcZ9GWCkuL+OdJTuA/8Cx8GUWnsWAD8jeDUQIgaLU3w5jvozbiIY1vrXkBhVYSl39plbmVJVJAFFySGek=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9965},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","scripts":{"dev":"tsup src/index.tsx --watch --format cjs,esm --dts","build":"tsup src/index.tsx --format cjs,esm --dts"},"_npmUser":{"name":"emmanuel-saleem","email":"emmanuelsaleem098765@gmail.com"},"_npmVersion":"10.8.2","description":"React component for validation - button moves away from your mouse when validation is invalid! 😂","directories":{},"_nodeVersion":"20.19.2","_hasShrinkwrap":false,"devDependencies":{"tsup":"^7.2.0","typescript":"^5.9.3","@types/react":"^18.3.27","@types/react-dom":"^18.3.7"},"peerDependencies":{"react":">=17","react-dom":">=17"},"_npmOperationalInternal":{"tmp":"tmp/moving-button_1.0.0_1763662844993_0.0527542182084062","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@emmanuel-saleem/moving-button","version":"1.0.1","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"scripts":{"build":"tsup src/index.tsx --format cjs,esm --dts","dev":"tsup src/index.tsx --watch --format cjs,esm --dts"},"peerDependencies":{"react":">=17","react-dom":">=17"},"devDependencies":{"@types/react":"^18.3.27","@types/react-dom":"^18.3.7","tsup":"^7.2.0","typescript":"^5.9.3"},"_id":"@emmanuel-saleem/moving-button@1.0.1","gitHead":"5d1cc9e7424554af0683adeab40102e5ea1cbcfa","description":"React component for validation - button moves away from your mouse when validation is invalid! 😂","_nodeVersion":"20.19.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-aQABFzKkYiDyPEuUwfvvuT/Px1Clyvoy3AWGy+UNHwZ2/c8bftLYOSIhFT0BfcuB4/Lj5o7FMfinxumfmz8qYQ==","shasum":"6be1f384f4f07e8577a9e6c2b308bb016010f044","tarball":"https://registry.npmjs.org/@emmanuel-saleem/moving-button/-/moving-button-1.0.1.tgz","fileCount":6,"unpackedSize":10205,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGkwEwkjkqWXm9E7Wk0hfc5V/drEn67Z1raBhjhFsW0jAiEA640myQvyD6T9lOz3IWLzrcjaa2eP8h5kC+Kk2FK2OFA="}]},"_npmUser":{"name":"emmanuel-saleem","email":"emmanuelsaleem098765@gmail.com"},"directories":{},"maintainers":[{"name":"emmanuel-saleem","email":"emmanuelsaleem098765@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/moving-button_1.0.1_1763665372148_0.37237502765275554"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-20T18:20:44.839Z","modified":"2025-11-20T19:02:52.523Z","1.0.0":"2025-11-20T18:20:45.200Z","1.0.1":"2025-11-20T19:02:52.327Z"},"description":"React component for validation - button moves away from your mouse when validation is invalid! 😂","maintainers":[{"name":"emmanuel-saleem","email":"emmanuelsaleem098765@gmail.com"}],"readme":"# @emmanuel-saleem/moving-button\n\nReact component for validation - button moves away from your mouse when validation is invalid! 😂\n\n## Install:\n```bash\nnpm install @emmanuel-saleem/moving-button\n```\n\n## Usage\n\nThe button will move full page on hover when validation is **invalid** (`isValid={false}`). Once validation is fixed (`isValid={true}`), the button will stop moving.\n\n```tsx\nimport { MovingButton } from \"@emmanuel-saleem/moving-button\";\n\n// Button moves when validation is invalid\n<MovingButton isValid={false}>\n    <button>Submit</button>\n</MovingButton>\n\n// Button doesn't move when validation is valid\n<MovingButton isValid={true}>\n    <button>Submit</button>\n</MovingButton>\n```\n\n## Props\n\n- `isValid` (boolean, default: `true`): When `false`, the button will move away from the cursor on hover. When `true`, the button stays in place.\n- `detectRadius` (number, default: `100`): The distance in pixels from the button center that triggers movement.\n- `children` (ReactNode): Custom button element. If not provided, a default styled button will be used.\n\n## Default Button\n\n```tsx\n<MovingButton isValid={false} />\n```\n\n## Testing\n\nTo test the package locally, use the included demo application:\n\n```bash\n# Navigate to demo directory\ncd demo\n\n# Install dependencies\nnpm install\n\n# Run the development server\nnpm run dev\n```\n\nOpen your browser to the URL shown (usually `http://localhost:5173`). The demo includes a form validation example where:\n\n- **Invalid State**: The button moves away from your mouse when validation fails\n- **Valid State**: The button stays in place when validation passes\n\nSee `demo/README.md` for more details.\n","readmeFilename":"README.md"}