{"_id":"@aargon-ui/modal","name":"@aargon-ui/modal","dist-tags":{"latest":"1.0.0-beta.1"},"versions":{"1.0.0-beta.1":{"name":"@aargon-ui/modal","version":"1.0.0-beta.1","description":"Animated modal 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"},"keywords":["react-native","modal","animated","ui","component"],"author":{"name":"Md Muhaiminul"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/aargon007/aargon-ui.git","directory":"packages/modal"},"homepage":"https://github.com/aargon007/aargon-ui/packages/modal#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","react-native-safe-area-context":"~5.6.0","react-native-gesture-handler":"~2.28.0"},"devDependencies":{"@types/react":"~19.1.10","@types/react-native":"^0.72.8","typescript":"~5.9.2"},"_id":"@aargon-ui/modal@1.0.0-beta.1","gitHead":"92091459196e85a243093de4c3c95c8ef84026c3","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-rURltZyHy194rrRENU4whAyTofDXEpMQkQV246xs+zBBTumnStYO9PairbcZ62UJRSwMOTxwsGW7L8auoMhsEg==","shasum":"6ad57eb92c1464dfda1aad095894da46578f1405","tarball":"https://registry.npmjs.org/@aargon-ui/modal/-/modal-1.0.0-beta.1.tgz","fileCount":14,"unpackedSize":46995,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDia4mP6OxgH8Pn1xvYFPg3UUpWR9bB0cNr217ifFuF7wIgC4S02supL1HdKhFlziQLdwNM36TKCUwhwlw+1f/mhOY="}]},"_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/modal_1.0.0-beta.1_1759206410522_0.26846231029550216"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-30T04:26:50.412Z","1.0.0-beta.1":"2025-09-30T04:26:50.725Z","modified":"2025-09-30T04:26:51.037Z"},"maintainers":[{"name":"aargon007","email":"muhaiminul032@gmail.com"}],"description":"Animated modal component for React Native","homepage":"https://github.com/aargon007/aargon-ui/packages/modal#readme","keywords":["react-native","modal","animated","ui","component"],"repository":{"type":"git","url":"git+https://github.com/aargon007/aargon-ui.git","directory":"packages/modal"},"author":{"name":"Md Muhaiminul"},"bugs":{"url":"https://github.com/aargon007/aargon-ui/issues"},"license":"MIT","readme":"# Aargon Modal\r\n\r\nA highly customizable, animated modal component for React Native with smooth animations and modern design.\r\n\r\n[![npm version](https://badge.fury.io/js/@aargon-ui/modal.svg)](https://www.npmjs.com/package/@aargon-ui/modal)\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, fullscreen, and bottom sheet 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/modal\r\n# or\r\nyarn add @aargon-ui/modal\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 react-native-safe-area-context react-native-gesture-handler\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 { AnimatedModal } from '@aargon-ui/modal';\r\n\r\nexport default function App() {\r\n    const [visible, setVisible] = useState(false);\r\n\r\n    return (\r\n        <View>\r\n            <Button title=\"Open Modal\" onPress={() => setVisible(true)} />\r\n            <AnimatedModal visible={visible} onClose={() => setVisible(false)}>\r\n                <Text>Modal Content</Text>\r\n            </AnimatedModal>\r\n        </View>\r\n    );\r\n}\r\n```\r\n\r\n## Basic Usage\r\n\r\n### Simple Modal\r\n\r\n```tsx\r\nconst [visible, setVisible] = useState(false);\r\n\r\n<AnimatedModal visible={visible} onClose={() => setVisible(false)}>\r\n    <Text>Modal Content</Text>\r\n</AnimatedModal>;\r\n```\r\n\r\n### With Header and Footer\r\n\r\n```tsx\r\n<AnimatedModal visible={visible} onClose={() => setVisible(false)} header={<Text>Modal Header</Text>} footer={<Text>Modal Footer</Text>}>\r\n    <Text>Modal body content</Text>\r\n</AnimatedModal>\r\n```\r\n\r\n### Dismissible Modal\r\n\r\n```tsx\r\n<AnimatedModal visible={visible} onClose={() => setVisible(false)} dismissible={true}>\r\n    <Text>Tap outside to close</Text>\r\n</AnimatedModal>\r\n```\r\n\r\n## Variants\r\n\r\n### Default Variant\r\n\r\n```tsx\r\n<AnimatedModal variant=\"default\">Default</AnimatedModal>\r\n```\r\n\r\n### Fullscreen Variant\r\n\r\n```tsx\r\n<AnimatedModal variant=\"fullscreen\">Fullscreen</AnimatedModal>\r\n```\r\n\r\n### Bottom Sheet Variant\r\n\r\n```tsx\r\n<AnimatedModal variant=\"bottomSheet\">Bottom Sheet</AnimatedModal>\r\n```\r\n\r\n## Sizes\r\n\r\n```tsx\r\n<AnimatedModal size=\"sm\">Small</AnimatedModal>\r\n<AnimatedModal size=\"md\">Medium</AnimatedModal>\r\n<AnimatedModal size=\"lg\">Large</AnimatedModal>\r\n```\r\n\r\n## Animation Types\r\n\r\n### Spring Animation (Default)\r\n\r\n```tsx\r\n<AnimatedModal animationType=\"spring\">Spring</AnimatedModal>\r\n```\r\n\r\n### Timing Animation\r\n\r\n```tsx\r\n<AnimatedModal animationType=\"timing\" duration={500}>\r\n    Timing\r\n</AnimatedModal>\r\n```\r\n\r\n### Bounce Animation\r\n\r\n```tsx\r\n<AnimatedModal animationType=\"bounce\">Bounce</AnimatedModal>\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: '#FFFFFF',\r\n        overlay: 'rgba(0, 0, 0, 0.5)',\r\n        text: '#374151',\r\n    },\r\n    borderRadius: 16,\r\n};\r\n\r\n<AnimatedModal theme={customTheme}>Custom Theme</AnimatedModal>;\r\n```\r\n\r\n### With Shadow\r\n\r\n```tsx\r\n<AnimatedModal shadow={true}>With Shadow</AnimatedModal>\r\n```\r\n\r\n## Advanced Usage\r\n\r\n### Custom Overlay\r\n\r\n```tsx\r\n<AnimatedModal visible={visible} onClose={() => setVisible(false)} overlayStyle={{ backgroundColor: 'rgba(255, 0, 0, 0.3)' }}>\r\n    <Text>Custom overlay</Text>\r\n</AnimatedModal>\r\n```\r\n\r\n### Disabled State\r\n\r\n```tsx\r\n<AnimatedModal disabled={true}>Disabled</AnimatedModal>\r\n```\r\n\r\n### Custom Animation\r\n\r\n```tsx\r\n<AnimatedModal visible={visible} onClose={() => setVisible(false)} animationType=\"timing\" duration={1000} easing=\"ease-in-out\">\r\n    <Text>Custom animation</Text>\r\n</AnimatedModal>\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| `visible`       | `boolean`                                    | `false`     | Whether the modal is visible                          |\r\n| `onClose`       | `() => void`                                 | -           | Function called when modal is closed                  |\r\n| `children`      | `React.ReactNode`                            | -           | Modal content                                         |\r\n| `header`        | `React.ReactNode`                            | -           | Header content                                        |\r\n| `footer`        | `React.ReactNode`                            | -           | Footer content                                        |\r\n| `variant`       | `\"default\" \\| \"fullscreen\" \\| \"bottomSheet\"` | `\"default\"` | Visual variant                                        |\r\n| `size`          | `\"sm\" \\| \"md\" \\| \"lg\"`                       | `\"md\"`      | Size of the modal                                     |\r\n| `animationType` | `\"timing\" \\| \"spring\" \\| \"bounce\"`           | `\"spring\"`  | Type of animation                                     |\r\n| `duration`      | `number`                                     | `300`       | Animation duration in milliseconds                    |\r\n| `dismissible`   | `boolean`                                    | `false`     | Whether the modal can be dismissed by tapping overlay |\r\n| `disabled`      | `boolean`                                    | `false`     | Whether the modal is disabled                         |\r\n| `overlayStyle`  | `ViewStyle`                                  | -           | Custom overlay styles                                 |\r\n| `theme`         | `ModalTheme`                                 | -           | 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 ModalTheme {\r\n    colors: {\r\n        background: string;\r\n        overlay: string;\r\n        text: string;\r\n        shadow: string;\r\n    };\r\n    borderRadius: number;\r\n    fontFamily?: string;\r\n}\r\n\r\ntype ModalVariant = 'default' | 'fullscreen' | 'bottomSheet';\r\ntype ModalSize = 'sm' | 'md' | 'lg';\r\ntype AnimationType = 'timing' | 'spring' | 'bounce';\r\n```\r\n\r\n## Accessibility\r\n\r\nThe modal component includes full accessibility support:\r\n\r\n- **ARIA attributes** - Proper `role=\"dialog\"` and `aria-modal` attributes\r\n- **Keyboard navigation** - Supports keyboard interaction\r\n- **Screen reader support** - Announces modal state 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- react-native-safe-area-context 5.6.0+\r\n- react-native-gesture-handler 2.28.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-2aa2f305aaed5e3bc25597911e4b6244"}