{"_id":"@amit327/react-native-bottom-modal","_rev":"4-1e808ebeecde5b8938c0ba2c6ea7b093","name":"@amit327/react-native-bottom-modal","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@amit327/react-native-bottom-modal","version":"1.0.0","keywords":["react-native","modal","bottom-sheet","bottom-modal","sheet"],"author":"","license":"MIT","_id":"@amit327/react-native-bottom-modal@1.0.0","maintainers":[{"name":"amit327","email":"kumaramit32788@gmail.com"}],"dist":{"shasum":"8e89dff9755d7bb1380778592d7c31b00fe7b217","tarball":"https://registry.npmjs.org/@amit327/react-native-bottom-modal/-/react-native-bottom-modal-1.0.0.tgz","fileCount":3,"integrity":"sha512-eJ8hLBGwZCM3dOFnmS4UvpDNbd0zRyUcW4dXIoJ3B9qjEyPk/17Fvo8siDuz+/pUCF/DM1D+93aX5yBOEQxplw==","signatures":[{"sig":"MEYCIQCW6aZTs/fUq3kcGdIZ1zXe5L2ZGkN/vxtIVaDnWj4JqwIhAIylYUM+2PBcgrQb24RxRRpKBFrIoj8CleTGKNZ3Dc9r","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1748},"main":"src/index.js","_npmUser":{"name":"amit327","email":"kumaramit32788@gmail.com"},"_npmVersion":"10.9.0","description":"A simple bottom sheet modal for React Native, controlled via ref (open/close).","directories":{},"_nodeVersion":"22.11.0","react-native":"src/index.js","_hasShrinkwrap":false,"peerDependencies":{"react":">=17.0.0","react-native":">=0.70.0"},"_npmOperationalInternal":{"tmp":"tmp/react-native-bottom-modal_1.0.0_1775233487363_0.5814272558580165","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@amit327/react-native-bottom-modal","version":"1.0.1","keywords":["react-native","modal","bottom-sheet","bottom-modal","sheet"],"author":"","license":"MIT","_id":"@amit327/react-native-bottom-modal@1.0.1","maintainers":[{"name":"amit327","email":"kumaramit32788@gmail.com"}],"dist":{"shasum":"aac17c0060bb482fb38d6a5d86ca56c3648f9257","tarball":"https://registry.npmjs.org/@amit327/react-native-bottom-modal/-/react-native-bottom-modal-1.0.1.tgz","fileCount":8,"integrity":"sha512-Sv4ozxy/3RDTqZUqSp1Jh2NtfH8aVtfYhaLiR1sqfeIQt2sXmrtUACIcuLsJuZfmuwrBgjfsImsRU+iGOixzjQ==","signatures":[{"sig":"MEUCIHsqs/Or5ii7YMkJEw5EoO/LtQ1mVPnLju80GUBnuBtqAiEAiNt/0zzZA2a/bHsUFXGbg+V2qmsc77s4IG3m+0MiRUY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7166},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"amit327","email":"kumaramit32788@gmail.com"},"_npmVersion":"10.9.0","description":"A simple bottom sheet modal for React Native, controlled via ref (open/close).","directories":{},"_nodeVersion":"22.11.0","react-native":"dist/index.js","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/react":"^18.2.0"},"peerDependencies":{"react":">=17.0.0","react-native":">=0.70.0"},"_npmOperationalInternal":{"tmp":"tmp/react-native-bottom-modal_1.0.1_1775234711272_0.4911956855908224","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@amit327/react-native-bottom-modal","version":"1.0.2","keywords":["react-native","modal","bottom-sheet","bottom-modal","sheet"],"author":"","license":"MIT","_id":"@amit327/react-native-bottom-modal@1.0.2","maintainers":[{"name":"amit327","email":"kumaramit32788@gmail.com"}],"dist":{"shasum":"88bcc65a4edc96a6b1086503ae31d9068947f016","tarball":"https://registry.npmjs.org/@amit327/react-native-bottom-modal/-/react-native-bottom-modal-1.0.2.tgz","fileCount":8,"integrity":"sha512-sqO0tAkFamBEbKPDEPtgB/RDTbIO1gerpnzjAzD71AECOmOk2iZStYVVYDp23O/QCL82fPO4t/2mxYWSzzgtiA==","signatures":[{"sig":"MEQCIAps7FAmLDO8YUoRHGGbXnbAIncmdMW2/mMNF592yhe+AiAvSMgQxzkyzpwAu+ePUxNUcKJv7NgBD0ctReOFoC//IQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8102},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js","react-native":"./dist/index.js"}},"scripts":{"build":"tsc","prepublishOnly":"npm run build"},"typings":"./dist/index.d.ts","_npmUser":{"name":"amit327","email":"kumaramit32788@gmail.com"},"_npmVersion":"10.9.0","description":"A simple bottom sheet modal for React Native, controlled via ref (open/close).","directories":{},"_nodeVersion":"22.11.0","react-native":"./dist/index.js","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/react":"^18.2.0"},"peerDependencies":{"react":">=17.0.0","react-native":">=0.70.0"},"_npmOperationalInternal":{"tmp":"tmp/react-native-bottom-modal_1.0.2_1775234949030_0.9550245964743118","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@amit327/react-native-bottom-modal","version":"1.0.3","description":"A bottom sheet modal for React Native with title, scrollable content, and backdrop dismiss (isVisible / onClose).","main":"./dist/index.js","types":"./dist/index.d.ts","typings":"./dist/index.d.ts","react-native":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","react-native":"./dist/index.js","require":"./dist/index.js","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"build":"tsc","prepublishOnly":"npm run build"},"devDependencies":{"@types/react":"^18.2.0","typescript":"^5.3.0"},"keywords":["react-native","modal","bottom-sheet","bottom-modal","sheet"],"author":"","license":"MIT","peerDependencies":{"react":">=17.0.0","react-native":">=0.70.0"},"_id":"@amit327/react-native-bottom-modal@1.0.3","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-dUmG+xWmSrOYVpwyDM0O8eW2XSrkdWvGG8zOIJiusKTa4GsjWSicVNyNl8QkE5qT2yJK6VDhUQIiC6avhKNZow==","shasum":"adb686e8078915918fa0a9f4cdfeadff71daef27","tarball":"https://registry.npmjs.org/@amit327/react-native-bottom-modal/-/react-native-bottom-modal-1.0.3.tgz","fileCount":8,"unpackedSize":10797,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCbuUDBs3oo4WgEPwO0UdTi/wlwNr7p0UwK0Mbftms4QQIgVnz6ccBUlXQRJSsIksvsX1kXFqp9RYIoiFOjZyKqYb0="}]},"_npmUser":{"name":"amit327","email":"kumaramit32788@gmail.com"},"directories":{},"maintainers":[{"name":"amit327","email":"kumaramit32788@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-bottom-modal_1.0.3_1775236014231_0.9243322524287263"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-03T16:24:47.278Z","modified":"2026-04-03T17:06:54.531Z","1.0.0":"2026-04-03T16:24:47.511Z","1.0.1":"2026-04-03T16:45:11.420Z","1.0.2":"2026-04-03T16:49:09.171Z","1.0.3":"2026-04-03T17:06:54.415Z"},"license":"MIT","keywords":["react-native","modal","bottom-sheet","bottom-modal","sheet"],"description":"A bottom sheet modal for React Native with title, scrollable content, and backdrop dismiss (isVisible / onClose).","maintainers":[{"name":"amit327","email":"kumaramit32788@gmail.com"}],"readme":"# @amit327/react-native-bottom-modal\n\nA bottom sheet–style modal for React Native: **controlled with `isVisible` and `onClose`**, **title**, **scrollable** body, **backdrop tap** to dismiss, and a **drag handle** — pull down on the handle/title area past a threshold (or fling) to close, with a short slide-out animation.\n\n## Requirements\n\n- React `>= 17`\n- React Native `>= 0.70`\n\n## Installation\n\n```bash\nnpm install @amit327/react-native-bottom-modal\n```\n\n```bash\nyarn add @amit327/react-native-bottom-modal\n```\n\nPeer dependencies (`react`, `react-native`) should already be installed in your app.\n\n### TypeScript\n\nTypes ship with the package (`dist/*.d.ts`, `types` in `package.json`). You do not need `@types/...` on DefinitelyTyped.\n\n## Usage\n\n```tsx\nimport React, { useState } from \"react\";\nimport { View, Button, Text } from \"react-native\";\nimport BottomModal from \"@amit327/react-native-bottom-modal\";\n\nexport default function App() {\n  const [visible, setVisible] = useState(false);\n\n  return (\n    <View style={{ flex: 1, justifyContent: \"center\", padding: 24 }}>\n      <Button title=\"Open modal\" onPress={() => setVisible(true)} />\n\n      <BottomModal\n        isVisible={visible}\n        title=\"Options\"\n        onClose={() => setVisible(false)}\n        containerStyle={{ height: 280 }}\n      >\n        <Text>Scrollable content goes here.</Text>\n        <Button title=\"Close\" onPress={() => setVisible(false)} />\n      </BottomModal>\n    </View>\n  );\n}\n```\n\n- Set **`isVisible={true}`** to open; **`false`** to close (often from state).\n- **`onClose`** runs when the user taps the dimmed area, **drags the handle/title strip down** far enough (or with enough downward velocity), or presses Android **back** (`onRequestClose`).\n- Use **`containerStyle`** to change sheet **height** (default **200**) or other layout.\n\n## API\n\n### Props\n\n| Prop | Type | Description |\n|------|------|-------------|\n| `isVisible` | `boolean` | Whether the modal is shown. |\n| `title` | `string` | Header text above the scroll area. |\n| `children` | `ReactNode` | Body content inside a `ScrollView`. |\n| `onClose` | `() => void` | Backdrop press and Android back. |\n| `containerStyle` | `StyleProp<ViewStyle>` | Optional styles for the white sheet (e.g. `height`, `maxHeight`). |\n\n### Named exports\n\n```ts\nimport BottomModal, { type BottomModalProps } from \"@amit327/react-native-bottom-modal\";\n```\n\n## Migrating from 1.0.x\n\nEarlier versions used a **ref** with `open()` / `close()`. **1.1.0** uses **`isVisible` / `onClose`** only. Replace ref calls with state:\n\n```tsx\nconst [open, setOpen] = useState(false);\n<BottomModal isVisible={open} title=\"Hello\" onClose={() => setOpen(false)} />\n```\n\n## Local development (test before publish)\n\nFrom your app:\n\n```json\n{\n  \"dependencies\": {\n    \"@amit327/react-native-bottom-modal\": \"file:../path/to/my-bottom-modal-lib\"\n  }\n}\n```\n\nRun **`npm run build`** in the library folder first (`file:` does not run `prepublishOnly`). Then:\n\n```bash\nnpm install\nnpx react-native start --reset-cache\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}