{"_id":"@aargon-ui/dropdown","name":"@aargon-ui/dropdown","dist-tags":{"latest":"1.0.0-beta.1"},"versions":{"1.0.0-beta.1":{"name":"@aargon-ui/dropdown","version":"1.0.0-beta.1","description":"Animated dropdown 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","dropdown","animated","ui","component"],"author":{"name":"Md Muhaiminul"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/aargon007/aargon-ui.git","directory":"packages/dropdown"},"homepage":"https://github.com/aargon007/aargon-ui/packages/dropdown#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/dropdown@1.0.0-beta.1","gitHead":"92091459196e85a243093de4c3c95c8ef84026c3","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-MdX+jMsaJ1kDiiZWUigwL24XBRzmHNJbwKcKYqjPf81ahOO9VHwjgtLHzs7T1O94l06ttu51GjrbzbO3tvqhKA==","shasum":"5501404585f3ae5910f3b2a511504bbd5a5deeff","tarball":"https://registry.npmjs.org/@aargon-ui/dropdown/-/dropdown-1.0.0-beta.1.tgz","fileCount":18,"unpackedSize":73825,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDLxBJE5wbg+6Q11nBpV9eolYtxzZE+RsTCsEtTk0xN1wIgBDDc2vCl5c/IykYx6CfyUYUi/Wj1i/zjg/rYoEFGvoE="}]},"_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/dropdown_1.0.0-beta.1_1759206047249_0.8497991831675802"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-30T04:20:47.112Z","1.0.0-beta.1":"2025-09-30T04:20:47.452Z","modified":"2025-09-30T04:20:48.098Z"},"maintainers":[{"name":"aargon007","email":"muhaiminul032@gmail.com"}],"description":"Animated dropdown component for React Native","homepage":"https://github.com/aargon007/aargon-ui/packages/dropdown#readme","keywords":["react-native","dropdown","animated","ui","component"],"repository":{"type":"git","url":"git+https://github.com/aargon007/aargon-ui.git","directory":"packages/dropdown"},"author":{"name":"Md Muhaiminul"},"bugs":{"url":"https://github.com/aargon007/aargon-ui/issues"},"license":"MIT","readme":"# Aargon Dropdown\r\n\r\nA highly customizable, animated dropdown component for React Native with smooth animations and modern design.\r\n\r\n[![npm version](https://badge.fury.io/js/@aargon-ui/dropdown.svg)](https://www.npmjs.com/package/@aargon-ui/dropdown)\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/dropdown\r\n# or\r\nyarn add @aargon-ui/dropdown\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 { AnimatedDropdown } from '@aargon-ui/dropdown';\r\n\r\nconst options = [\r\n    { label: 'Option 1', value: '1' },\r\n    { label: 'Option 2', value: '2' },\r\n    { label: 'Option 3', value: '3' },\r\n];\r\n\r\nexport default function App() {\r\n    const [selectedValue, setSelectedValue] = useState('');\r\n\r\n    return (\r\n        <View>\r\n            <AnimatedDropdown options={options} selectedValue={selectedValue} onSelect={setSelectedValue} placeholder=\"Select an option\" />\r\n        </View>\r\n    );\r\n}\r\n```\r\n\r\n## Basic Usage\r\n\r\n### Simple Dropdown\r\n\r\n```tsx\r\nconst options = [\r\n    { label: 'Apple', value: 'apple' },\r\n    { label: 'Banana', value: 'banana' },\r\n    { label: 'Orange', value: 'orange' },\r\n];\r\n\r\n<AnimatedDropdown options={options} selectedValue={selectedValue} onSelect={setSelectedValue} placeholder=\"Choose a fruit\" />;\r\n```\r\n\r\n### With Custom Renderer\r\n\r\n```tsx\r\n<AnimatedDropdown\r\n    options={options}\r\n    selectedValue={selectedValue}\r\n    onSelect={setSelectedValue}\r\n    renderItem={({ item }) => (\r\n        <View style={{ padding: 10 }}>\r\n            <Text>{item.label}</Text>\r\n        </View>\r\n    )}\r\n/>\r\n```\r\n\r\n### Multi-Select\r\n\r\n```tsx\r\n<AnimatedDropdown\r\n    options={options}\r\n    selectedValue={selectedValues}\r\n    onSelect={setSelectedValues}\r\n    multiSelect={true}\r\n    placeholder=\"Choose multiple options\"\r\n/>\r\n```\r\n\r\n## Variants\r\n\r\n### Default Variant\r\n\r\n```tsx\r\n<AnimatedDropdown variant=\"default\">Default</AnimatedDropdown>\r\n```\r\n\r\n### Filled Variant\r\n\r\n```tsx\r\n<AnimatedDropdown variant=\"filled\">Filled</AnimatedDropdown>\r\n```\r\n\r\n### Outlined Variant\r\n\r\n```tsx\r\n<AnimatedDropdown variant=\"outlined\">Outlined</AnimatedDropdown>\r\n```\r\n\r\n## Sizes\r\n\r\n```tsx\r\n<AnimatedDropdown size=\"sm\">Small</AnimatedDropdown>\r\n<AnimatedDropdown size=\"md\">Medium</AnimatedDropdown>\r\n<AnimatedDropdown size=\"lg\">Large</AnimatedDropdown>\r\n```\r\n\r\n## Animation Types\r\n\r\n### Spring Animation (Default)\r\n\r\n```tsx\r\n<AnimatedDropdown animationType=\"spring\">Spring</AnimatedDropdown>\r\n```\r\n\r\n### Timing Animation\r\n\r\n```tsx\r\n<AnimatedDropdown animationType=\"timing\" duration={500}>\r\n    Timing\r\n</AnimatedDropdown>\r\n```\r\n\r\n### Bounce Animation\r\n\r\n```tsx\r\n<AnimatedDropdown animationType=\"bounce\">Bounce</AnimatedDropdown>\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        border: '#E5E7EB',\r\n        text: '#374151',\r\n    },\r\n    borderRadius: 8,\r\n};\r\n\r\n<AnimatedDropdown theme={customTheme}>Custom Theme</AnimatedDropdown>;\r\n```\r\n\r\n### With Shadow\r\n\r\n```tsx\r\n<AnimatedDropdown shadow={true}>With Shadow</AnimatedDropdown>\r\n```\r\n\r\n## Advanced Usage\r\n\r\n### Disabled State\r\n\r\n```tsx\r\n<AnimatedDropdown disabled={true}>Disabled</AnimatedDropdown>\r\n```\r\n\r\n### Searchable Dropdown\r\n\r\n```tsx\r\n<AnimatedDropdown\r\n    options={options}\r\n    selectedValue={selectedValue}\r\n    onSelect={setSelectedValue}\r\n    searchable={true}\r\n    searchPlaceholder=\"Search options...\"\r\n/>\r\n```\r\n\r\n### Custom Header\r\n\r\n```tsx\r\n<AnimatedDropdown options={options} selectedValue={selectedValue} onSelect={setSelectedValue} header={<Text>Custom Header</Text>} />\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| `options`       | `DropdownOption[]`                          | -           | Array of dropdown options               |\r\n| `selectedValue` | `string \\| string[]`                        | -           | Currently selected value(s)             |\r\n| `onSelect`      | `(value: string \\| string[]) => void`       | -           | Function called when option is selected |\r\n| `placeholder`   | `string`                                    | -           | Placeholder text                        |\r\n| `variant`       | `\"default\" \\| \"filled\" \\| \"outlined\"`       | `\"default\"` | Visual variant                          |\r\n| `size`          | `\"sm\" \\| \"md\" \\| \"lg\"`                      | `\"md\"`      | Size of the dropdown                    |\r\n| `animationType` | `\"timing\" \\| \"spring\" \\| \"bounce\"`          | `\"spring\"`  | Type of animation                       |\r\n| `duration`      | `number`                                    | `300`       | Animation duration in milliseconds      |\r\n| `multiSelect`   | `boolean`                                   | `false`     | Whether multiple selection is allowed   |\r\n| `searchable`    | `boolean`                                   | `false`     | Whether the dropdown is searchable      |\r\n| `disabled`      | `boolean`                                   | `false`     | Whether the dropdown is disabled        |\r\n| `renderItem`    | `(item: DropdownOption) => React.ReactNode` | -           | Custom item renderer                    |\r\n| `header`        | `React.ReactNode`                           | -           | Custom header content                   |\r\n| `theme`         | `DropdownTheme`                             | -           | 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 DropdownOption {\r\n    label: string;\r\n    value: string;\r\n    disabled?: boolean;\r\n}\r\n\r\ninterface DropdownTheme {\r\n    colors: {\r\n        background: string;\r\n        border: string;\r\n        text: string;\r\n        placeholder: string;\r\n    };\r\n    borderRadius: number;\r\n    fontFamily?: string;\r\n}\r\n\r\ntype DropdownVariant = 'default' | 'filled' | 'outlined';\r\ntype DropdownSize = 'sm' | 'md' | 'lg';\r\ntype AnimationType = 'timing' | 'spring' | 'bounce';\r\n```\r\n\r\n## Accessibility\r\n\r\nThe dropdown component includes full accessibility support:\r\n\r\n- **ARIA attributes** - Proper `role=\"combobox\"` and `aria-expanded` attributes\r\n- **Keyboard navigation** - Supports keyboard interaction\r\n- **Screen reader support** - Announces options and selections 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-65bd2889ccfa8c19279c03ac3f4922af"}