{"_id":"@aargon-ui/checkbox","name":"@aargon-ui/checkbox","dist-tags":{"latest":"1.0.0-beta.1"},"versions":{"1.0.0-beta.1":{"name":"@aargon-ui/checkbox","version":"1.0.0-beta.1","description":"Animated checkbox component for React Native","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","build:watch":"tsc --watch","dev":"tsc --watch","type-check":"tsc --noEmit","lint":"eslint src --ext .ts,.tsx","clean":"rm -rf lib","publish":"npm publish --otp=$OTP --access public"},"keywords":["react-native","checkbox","animated","ui","component"],"author":{"name":"Md Muhaiminul"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/aargon007/aargon-ui.git","directory":"packages/checkbox"},"homepage":"https://github.com/aargon007/aargon-ui/packages/checkbox#readme","bugs":{"url":"https://github.com/aargon007/aargon-ui/issues"},"peerDependencies":{"react":">=19.0.0","react-native":">=0.81.0","react-native-reanimated":">=3.0.0"},"devDependencies":{"@types/react":"~19.1.10","@types/react-native":"^0.72.8","typescript":"~5.9.2"},"_id":"@aargon-ui/checkbox@1.0.0-beta.1","gitHead":"92091459196e85a243093de4c3c95c8ef84026c3","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-krYmsANEratq08+dV7jq5DvSBa0TUxsejuHqM20iICttpS0eaytvyluWGRTBqIcxK8qdwGq0FT6GuX7al9F4Kg==","shasum":"9c0ab1645d830d865c6458d78a4c8a6ce035bba9","tarball":"https://registry.npmjs.org/@aargon-ui/checkbox/-/checkbox-1.0.0-beta.1.tgz","fileCount":10,"unpackedSize":24183,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCH8Yw5cvBnTpK5sT7M8HzWCCz0DPZv9rvLa5Ta0ryXywIgDUHYwJv8uVmT1jIItAwc+4Imgj/dnziUZ1k2TwAd9UM="}]},"_npmUser":{"name":"aargon007","email":"muhaiminul032@gmail.com"},"directories":{},"maintainers":[{"name":"aargon007","email":"muhaiminul032@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/checkbox_1.0.0-beta.1_1759205924573_0.8723798672854717"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-30T04:18:44.502Z","1.0.0-beta.1":"2025-09-30T04:18:44.758Z","modified":"2025-09-30T04:18:45.089Z"},"maintainers":[{"name":"aargon007","email":"muhaiminul032@gmail.com"}],"description":"Animated checkbox component for React Native","homepage":"https://github.com/aargon007/aargon-ui/packages/checkbox#readme","keywords":["react-native","checkbox","animated","ui","component"],"repository":{"type":"git","url":"git+https://github.com/aargon007/aargon-ui.git","directory":"packages/checkbox"},"author":{"name":"Md Muhaiminul"},"bugs":{"url":"https://github.com/aargon007/aargon-ui/issues"},"license":"MIT","readme":"# Aargon Checkbox\r\n\r\nA highly customizable, animated checkbox component for React Native with smooth animations and modern design.\r\n\r\n[![npm version](https://badge.fury.io/js/@aargon-ui/checkbox.svg)](https://www.npmjs.com/package/@aargon-ui/checkbox)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n## Features\r\n\r\n- 🎨 **Multiple Variants** - Default, filled, and outlined styles\r\n- 📏 **Size Options** - Small, medium, and large sizes\r\n- ⚡ **Smooth Animations** - Spring, timing, and bounce animations\r\n- 🎯 **Accessibility** - Full accessibility support with proper ARIA attributes\r\n- 🎨 **Customizable Themes** - Complete theming system with colors and styling\r\n- 🔧 **Flexible API** - Easy to use with comprehensive props\r\n- 📱 **React Native** - Built specifically for React Native with Reanimated\r\n- 🌟 **TypeScript** - Full TypeScript support with comprehensive types\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @aargon-ui/checkbox\r\n# or\r\nyarn add @aargon-ui/checkbox\r\n```\r\n\r\n### Peer Dependencies\r\n\r\nMake sure you have the required peer dependencies installed:\r\n\r\n```bash\r\nnpm install react react-native react-native-reanimated\r\n```\r\n\r\n## Quick Start\r\n\r\n```tsx\r\nimport React, { useState } from 'react';\r\nimport { View, Text } from 'react-native';\r\nimport { AnimatedCheckbox } from '@aargon-ui/checkbox';\r\n\r\nexport default function App() {\r\n    const [checked, setChecked] = useState(false);\r\n\r\n    return (\r\n        <View>\r\n            <AnimatedCheckbox checked={checked} onPress={() => setChecked(!checked)}>\r\n                <Text>Check me</Text>\r\n            </AnimatedCheckbox>\r\n        </View>\r\n    );\r\n}\r\n```\r\n\r\n## Basic Usage\r\n\r\n### Simple Checkbox\r\n\r\n```tsx\r\nconst [checked, setChecked] = useState(false);\r\n\r\n<AnimatedCheckbox checked={checked} onPress={() => setChecked(!checked)}>\r\n    <Text>Check me</Text>\r\n</AnimatedCheckbox>;\r\n```\r\n\r\n### Without Label\r\n\r\n```tsx\r\n<AnimatedCheckbox checked={checked} onPress={() => setChecked(!checked)} />\r\n```\r\n\r\n### Indeterminate State\r\n\r\n```tsx\r\n<AnimatedCheckbox checked={checked} indeterminate={true} onPress={() => setChecked(!checked)}>\r\n    <Text>Indeterminate</Text>\r\n</AnimatedCheckbox>\r\n```\r\n\r\n## Variants\r\n\r\n### Default Variant\r\n\r\n```tsx\r\n<AnimatedCheckbox variant=\"default\">Default</AnimatedCheckbox>\r\n```\r\n\r\n### Filled Variant\r\n\r\n```tsx\r\n<AnimatedCheckbox variant=\"filled\">Filled</AnimatedCheckbox>\r\n```\r\n\r\n### Outlined Variant\r\n\r\n```tsx\r\n<AnimatedCheckbox variant=\"outlined\">Outlined</AnimatedCheckbox>\r\n```\r\n\r\n## Sizes\r\n\r\n```tsx\r\n<AnimatedCheckbox size=\"sm\">Small</AnimatedCheckbox>\r\n<AnimatedCheckbox size=\"md\">Medium</AnimatedCheckbox>\r\n<AnimatedCheckbox size=\"lg\">Large</AnimatedCheckbox>\r\n```\r\n\r\n## Animation Types\r\n\r\n### Spring Animation (Default)\r\n\r\n```tsx\r\n<AnimatedCheckbox animationType=\"spring\">Spring</AnimatedCheckbox>\r\n```\r\n\r\n### Timing Animation\r\n\r\n```tsx\r\n<AnimatedCheckbox animationType=\"timing\" duration={500}>\r\n    Timing\r\n</AnimatedCheckbox>\r\n```\r\n\r\n### Bounce Animation\r\n\r\n```tsx\r\n<AnimatedCheckbox animationType=\"bounce\">Bounce</AnimatedCheckbox>\r\n```\r\n\r\n## Custom Styling\r\n\r\n### Custom Theme\r\n\r\n```tsx\r\nconst customTheme = {\r\n    colors: {\r\n        background: '#3B82F6',\r\n        border: '#1D4ED8',\r\n        checkmark: '#FFFFFF',\r\n    },\r\n    borderRadius: 4,\r\n};\r\n\r\n<AnimatedCheckbox theme={customTheme}>Custom Theme</AnimatedCheckbox>;\r\n```\r\n\r\n### With Shadow\r\n\r\n```tsx\r\n<AnimatedCheckbox shadow={true}>With Shadow</AnimatedCheckbox>\r\n```\r\n\r\n## Advanced Usage\r\n\r\n### Disabled State\r\n\r\n```tsx\r\n<AnimatedCheckbox disabled={true}>Disabled</AnimatedCheckbox>\r\n```\r\n\r\n### Custom Checkmark\r\n\r\n```tsx\r\n<AnimatedCheckbox customCheckmark={<Text>✓</Text>} checked={checked} onPress={() => setChecked(!checked)}>\r\n    Custom Checkmark\r\n</AnimatedCheckbox>\r\n```\r\n\r\n### Checkbox Group\r\n\r\n```tsx\r\nconst [values, setValues] = useState(['option1']);\r\n\r\n<View>\r\n    <AnimatedCheckbox\r\n        checked={values.includes('option1')}\r\n        onPress={() => {\r\n            if (values.includes('option1')) {\r\n                setValues(values.filter(v => v !== 'option1'));\r\n            } else {\r\n                setValues([...values, 'option1']);\r\n            }\r\n        }}>\r\n        Option 1\r\n    </AnimatedCheckbox>\r\n    <AnimatedCheckbox\r\n        checked={values.includes('option2')}\r\n        onPress={() => {\r\n            if (values.includes('option2')) {\r\n                setValues(values.filter(v => v !== 'option2'));\r\n            } else {\r\n                setValues([...values, 'option2']);\r\n            }\r\n        }}>\r\n        Option 2\r\n    </AnimatedCheckbox>\r\n</View>;\r\n```\r\n\r\n## API Reference\r\n\r\n### Props\r\n\r\n| Prop              | Type                                  | Default     | Description                                    |\r\n| ----------------- | ------------------------------------- | ----------- | ---------------------------------------------- |\r\n| `children`        | `React.ReactNode`                     | -           | Label content                                  |\r\n| `checked`         | `boolean`                             | `false`     | Whether the checkbox is checked                |\r\n| `onPress`         | `() => void`                          | -           | Function called when checkbox is pressed       |\r\n| `variant`         | `\"default\" \\| \"filled\" \\| \"outlined\"` | `\"default\"` | Visual variant                                 |\r\n| `size`            | `\"sm\" \\| \"md\" \\| \"lg\"`                | `\"md\"`      | Size of the checkbox                           |\r\n| `animationType`   | `\"timing\" \\| \"spring\" \\| \"bounce\"`    | `\"spring\"`  | Type of animation                              |\r\n| `duration`        | `number`                              | `300`       | Animation duration in milliseconds             |\r\n| `indeterminate`   | `boolean`                             | `false`     | Whether the checkbox is in indeterminate state |\r\n| `disabled`        | `boolean`                             | `false`     | Whether the checkbox is disabled               |\r\n| `customCheckmark` | `React.ReactNode`                     | -           | Custom checkmark element                       |\r\n| `theme`           | `CheckboxTheme`                       | -           | Custom theme object                            |\r\n| `shadow`          | `boolean`                             | `false`     | Whether to show shadow effect                  |\r\n\r\n### Types\r\n\r\n```tsx\r\ninterface CheckboxTheme {\r\n    colors: {\r\n        background: string;\r\n        border: string;\r\n        checkmark: string;\r\n        shadow: string;\r\n    };\r\n    borderRadius: number;\r\n    fontFamily?: string;\r\n}\r\n\r\ntype CheckboxVariant = 'default' | 'filled' | 'outlined';\r\ntype CheckboxSize = 'sm' | 'md' | 'lg';\r\ntype AnimationType = 'timing' | 'spring' | 'bounce';\r\n```\r\n\r\n## Accessibility\r\n\r\nThe checkbox component includes full accessibility support:\r\n\r\n- **ARIA attributes** - Proper `role=\"checkbox\"` and `aria-checked` attributes\r\n- **Keyboard navigation** - Supports keyboard interaction\r\n- **Screen reader support** - Announces state changes to screen readers\r\n- **Focus management** - Proper focus handling for keyboard users\r\n\r\n## Requirements\r\n\r\n- React Native 0.81.0+\r\n- React 19.0.0+\r\n- react-native-reanimated 3.0.0+\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please feel free to submit a Pull Request.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Support\r\n\r\nIf you have any questions or need help, please:\r\n\r\n1. Check the [documentation](https://github.com/aargon007/aargon-ui#readme)\r\n2. Search [existing issues](https://github.com/aargon007/aargon-ui/issues)\r\n3. Create a [new issue](https://github.com/aargon007/aargon-ui/issues/new)\r\n\r\n## Changelog\r\n\r\nSee [CHANGELOG.md](CHANGELOG.md) for a list of changes and version history.\r\n\r\n---\r\n\r\nMade with ❤️ by [Aargon](https://github.com/aargon007)\r\n","readmeFilename":"README.md","_rev":"1-ae1fbd315813e2830d1f1c66aa456ae7"}