{"_id":"@aargon-ui/button","name":"@aargon-ui/button","dist-tags":{"latest":"1.0.0-beta.1"},"versions":{"1.0.0-beta.1":{"name":"@aargon-ui/button","version":"1.0.0-beta.1","description":"Animated button 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","button","animated","ui","component"],"author":{"name":"Md Muhaiminul"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/aargon007/aargon-ui.git","directory":"packages/button"},"homepage":"https://github.com/aargon007/aargon-ui/packages/button#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","@expo/vector-icons":"^15.0.2"},"devDependencies":{"@types/react":"~19.1.10","@types/react-native":"^0.72.8","typescript":"~5.9.2"},"_id":"@aargon-ui/button@1.0.0-beta.1","gitHead":"92091459196e85a243093de4c3c95c8ef84026c3","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-kvZInRl/EyTzy2v4UMvJYsD9nQCApqun5LdyJqWnevhmJxxDpW/S/6+PCAazAjI3VwM6egOhhPoxsL+EsG1JnA==","shasum":"b114cbf143f952d46a3f372181b3373d04b76d2f","tarball":"https://registry.npmjs.org/@aargon-ui/button/-/button-1.0.0-beta.1.tgz","fileCount":14,"unpackedSize":41685,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGak0IBcAyV3IZkXVZzXdMDQxy1SzfkerS6NnfCRk3LYAiBWf4n/bxBT2U/7bXTCmULvnAJnNo4OSp5BVC7Cla3JZQ=="}]},"_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/button_1.0.0-beta.1_1759205694828_0.06832968860064548"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-30T04:14:54.771Z","1.0.0-beta.1":"2025-09-30T04:14:55.031Z","modified":"2025-09-30T04:14:55.265Z"},"maintainers":[{"name":"aargon007","email":"muhaiminul032@gmail.com"}],"description":"Animated button component for React Native","homepage":"https://github.com/aargon007/aargon-ui/packages/button#readme","keywords":["react-native","button","animated","ui","component"],"repository":{"type":"git","url":"git+https://github.com/aargon007/aargon-ui.git","directory":"packages/button"},"author":{"name":"Md Muhaiminul"},"bugs":{"url":"https://github.com/aargon007/aargon-ui/issues"},"license":"MIT","readme":"# Aargon Button\r\n\r\nA highly customizable, animated button component for React Native with smooth animations and modern design.\r\n\r\n[![npm version](https://badge.fury.io/js/@aargon-ui/button.svg)](https://www.npmjs.com/package/@aargon-ui/button)\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, solid, outline, ghost, and link 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- 🎭 **Icon Support** - Customizable icons with multiple positions\r\n- 🌟 **TypeScript** - Full TypeScript support with comprehensive types\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @aargon-ui/button\r\n# or\r\nyarn add @aargon-ui/button\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 @expo/vector-icons\r\n```\r\n\r\n## Quick Start\r\n\r\n```tsx\r\nimport React from 'react';\r\nimport { View } from 'react-native';\r\nimport { AnimatedButton } from '@aargon-ui/button';\r\n\r\nexport default function App() {\r\n    return (\r\n        <View>\r\n            <AnimatedButton onPress={() => console.log('Pressed!')}>Click Me</AnimatedButton>\r\n        </View>\r\n    );\r\n}\r\n```\r\n\r\n## Basic Usage\r\n\r\n### Simple Button\r\n\r\n```tsx\r\n<AnimatedButton onPress={() => console.log('Pressed!')}>Click Me</AnimatedButton>\r\n```\r\n\r\n### With Icon\r\n\r\n```tsx\r\n<AnimatedButton icon=\"heart\" iconPosition=\"left\" onPress={() => console.log('Liked!')}>\r\n    Like\r\n</AnimatedButton>\r\n```\r\n\r\n### Loading State\r\n\r\n```tsx\r\n<AnimatedButton loading={true} onPress={() => console.log('Loading...')}>\r\n    Loading...\r\n</AnimatedButton>\r\n```\r\n\r\n## Variants\r\n\r\n### Default Variant\r\n\r\n```tsx\r\n<AnimatedButton variant=\"default\">Default</AnimatedButton>\r\n```\r\n\r\n### Solid Variant\r\n\r\n```tsx\r\n<AnimatedButton variant=\"solid\">Solid</AnimatedButton>\r\n```\r\n\r\n### Outline Variant\r\n\r\n```tsx\r\n<AnimatedButton variant=\"outline\">Outline</AnimatedButton>\r\n```\r\n\r\n### Ghost Variant\r\n\r\n```tsx\r\n<AnimatedButton variant=\"ghost\">Ghost</AnimatedButton>\r\n```\r\n\r\n### Link Variant\r\n\r\n```tsx\r\n<AnimatedButton variant=\"link\">Link</AnimatedButton>\r\n```\r\n\r\n## Sizes\r\n\r\n```tsx\r\n<AnimatedButton size=\"sm\">Small</AnimatedButton>\r\n<AnimatedButton size=\"md\">Medium</AnimatedButton>\r\n<AnimatedButton size=\"lg\">Large</AnimatedButton>\r\n```\r\n\r\n## Animation Types\r\n\r\n### Spring Animation (Default)\r\n\r\n```tsx\r\n<AnimatedButton animationType=\"spring\">Spring</AnimatedButton>\r\n```\r\n\r\n### Timing Animation\r\n\r\n```tsx\r\n<AnimatedButton animationType=\"timing\" duration={500}>\r\n    Timing\r\n</AnimatedButton>\r\n```\r\n\r\n### Bounce Animation\r\n\r\n```tsx\r\n<AnimatedButton animationType=\"bounce\">Bounce</AnimatedButton>\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        text: '#FFFFFF',\r\n        border: '#1D4ED8',\r\n    },\r\n    borderRadius: 12,\r\n};\r\n\r\n<AnimatedButton theme={customTheme}>Custom Theme</AnimatedButton>;\r\n```\r\n\r\n### With Shadow\r\n\r\n```tsx\r\n<AnimatedButton shadow={true}>With Shadow</AnimatedButton>\r\n```\r\n\r\n## Advanced Usage\r\n\r\n### Icon Positions\r\n\r\n```tsx\r\n<AnimatedButton icon=\"arrow-right\" iconPosition=\"left\">Left Icon</AnimatedButton>\r\n<AnimatedButton icon=\"arrow-right\" iconPosition=\"right\">Right Icon</AnimatedButton>\r\n```\r\n\r\n### Disabled State\r\n\r\n```tsx\r\n<AnimatedButton disabled={true}>Disabled</AnimatedButton>\r\n```\r\n\r\n### Full Width\r\n\r\n```tsx\r\n<AnimatedButton fullWidth={true}>Full Width</AnimatedButton>\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`                                        | -           | Content to display in the button       |\r\n| `onPress`       | `() => void`                                             | -           | Function called when button is pressed |\r\n| `variant`       | `\"default\" \\| \"solid\" \\| \"outline\" \\| \"ghost\" \\| \"link\"` | `\"default\"` | Visual variant                         |\r\n| `size`          | `\"sm\" \\| \"md\" \\| \"lg\"`                                   | `\"md\"`      | Size of the button                     |\r\n| `animationType` | `\"timing\" \\| \"spring\" \\| \"bounce\"`                       | `\"spring\"`  | Type of animation                      |\r\n| `duration`      | `number`                                                 | `300`       | Animation duration in milliseconds     |\r\n| `icon`          | `string`                                                 | -           | Icon name from @expo/vector-icons      |\r\n| `iconPosition`  | `\"left\" \\| \"right\"`                                      | `\"left\"`    | Position of the icon                   |\r\n| `loading`       | `boolean`                                                | `false`     | Whether the button is in loading state |\r\n| `disabled`      | `boolean`                                                | `false`     | Whether the button is disabled         |\r\n| `fullWidth`     | `boolean`                                                | `false`     | Whether the button takes full width    |\r\n| `theme`         | `ButtonTheme`                                            | -           | 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 ButtonTheme {\r\n    colors: {\r\n        background: string;\r\n        text: string;\r\n        border: string;\r\n        shadow: string;\r\n    };\r\n    borderRadius: number;\r\n    fontFamily?: string;\r\n}\r\n\r\ntype ButtonVariant = 'default' | 'solid' | 'outline' | 'ghost' | 'link';\r\ntype ButtonSize = 'sm' | 'md' | 'lg';\r\ntype AnimationType = 'timing' | 'spring' | 'bounce';\r\n```\r\n\r\n## Accessibility\r\n\r\nThe button component includes full accessibility support:\r\n\r\n- **ARIA attributes** - Proper `role` and `aria-label` 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- @expo/vector-icons 15.0.2+\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-49ed6dfe0e4e184a9931968fd81bd863"}