{"id":24791417,"url":"https://github.com/corasan/modal-sheet","last_synced_at":"2025-10-12T15:31:22.251Z","repository":{"id":231595416,"uuid":"781994155","full_name":"corasan/modal-sheet","owner":"corasan","description":"iOS like fullscreen modal Sheet component for iOS and Android.","archived":false,"fork":false,"pushed_at":"2024-09-04T23:57:16.000Z","size":1624,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T00:46:06.261Z","etag":null,"topics":["react-native","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corasan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-04T12:41:22.000Z","updated_at":"2024-11-14T21:19:07.000Z","dependencies_parsed_at":"2024-04-22T12:28:02.254Z","dependency_job_id":"5064aa25-c8bf-4c57-991d-93a6796787a8","html_url":"https://github.com/corasan/modal-sheet","commit_stats":null,"previous_names":["corasan/react-native-modal-sheet","corasan/modal-sheet"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corasan%2Fmodal-sheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corasan%2Fmodal-sheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corasan%2Fmodal-sheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corasan%2Fmodal-sheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corasan","download_url":"https://codeload.github.com/corasan/modal-sheet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236239214,"owners_count":19117165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react-native","typescript"],"created_at":"2025-01-29T19:16:52.567Z","updated_at":"2025-10-12T15:31:16.903Z","avatar_url":"https://github.com/corasan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./example/assets/RocketSim_Recording_iPhone_13_Pro_6.1_2024-07-04_19.09.50.gif\" height=\"450\" /\u003e\n\n## Installation\n\n```bash\nnpm install @corasan/modal-sheet\nyarn add @corasan/modal-sheet\nbun add @corasan/modal-sheet\n```\n\n## Usage\n\nFirst, wrap your application with the `ModalSheetProvider` component.\n\n```tsx\nimport { ModalSheetProvider } from '@corasan/modal-sheet';\n\nfunction App() {\n  return (\n    \u003cModalSheetProvider\u003e\n      \u003cYourApp /\u003e\n    \u003c/ModalSheetProvider\u003e\n  );\n}\n```\n\nUse refs to expand and minimize the modal sheet.\n\n```tsx\nimport { ModalSheetStackRef, ModalSheetStack } from '@corasan/modal-sheet';\n\nfunction YourComponent() {\n  const modalRef = useRef\u003cModalSheetStackRef\u003e()\n\n  return (\n    \u003cView style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}\u003e\n      \u003cButto title=\"Open Modal\" onClick={() =\u003e modalRef.current.open())} /\u003e\n\n      \u003cModalSheetStack ref={modalRef} name=\"modal-drawer\"\u003e\n        \u003cView style={{ flex: 1 }}\u003e\n          \u003cView style={{ flexDirection: \"row\", justifyContent: \"center\" }}\u003e\n            \u003cText style={{ fontWeight: \"500\", fontSize: 18 }}\u003eTitle\u003c/Text\u003e\n          \u003c/View\u003e\n\n          \u003cView\n            style={{\n              paddingVertical: 40,\n              alignItems: \"center\",\n              justifyContent: \"center\",\n            }}\n          \u003e\n            \u003cButton\n              title=\"Close Modal\"\n              onPress={() =\u003e {\n                modalRef.current.dismiss();\n              }}\n            /\u003e\n          \u003c/View\u003e\n        \u003c/View\u003e\n      \u003c/ModalSheetStack\u003e\n    \u003c/View\u003e\n  );\n}\n```\n\n## Components\n\n\u003c!-- ### ModalSheet\n\nThe `ModalSheet` component is a modal sheet that can be expanded and minimized. It can be used to create a drawer-type of modal sheet and can be stacked on top of each other.\n\n| Name | Type | Default  | Description | Required |\n| --- | --- | --- | --- | --- |\n| ref | React.RefObject\\\u003cModalSheetRef\u003e | - | Ref for the modal sheet | Yes |\n| name | string | - | The name of the modal sheet | Yes |\n| children | ReactNode | - | The children components | Kinda yeah |\n| containerStyle | string | - | Styles for the modal sheet container | No |\n| noHandle | boolean | false | Hide the handle | No |\n| sizes | number[] | [100, 300, 600] | The sizes the modal can be expanded to | No |\n| backdropColor | string | \"black\" | The color of the backdrop | No |\n| backdropOpacity | number | 0.4 | The opacity of the backdrop | No |\n| offset | number | 0 | Add an offset at the bottom of the modal sheet when it's minimized | No | --\u003e\n\u003c!-- | disableSheetStackEffect | boolean | - | Disable sheet stack effect | No |\n| onGestureUpdate | (e: GestureUpdateEvent\\\u003cPanGestureHandlerEventPayload\u003e) =\u003e void| - | Custom callback to handle gesture updates | No |\n| onGestureBegin | (e: GestureStateChangeEvent\\\u003cPanGestureHandlerEventPayload\u003e) =\u003e void| - | Custom callback to handle on gesture begin | No |\n| onGestureEnd | (e: GestureStateChangeEvent\\\u003cPanGestureHandlerEventPayload\u003e) =\u003e void| - | Custom callback to handle on gesture end | No |\n| onGestureStart | (e: GestureStateChangeEvent\\\u003cPanGestureHandlerEventPayload\u003e) =\u003e void| - | Custom callback to handle on gesture start | No |\n| onGestureFinalize | (e: GestureStateChangeEvent\\\u003cPanGestureHandlerEventPayload\u003e) =\u003e void| - | Custom callback to handle on gesture finalize | No |\n| onGestureTouchesDown | (e: GestureTouchEvent) =\u003e void| - | Custom callback to handle on gesture touch down | No |\n| onGestureTouchesUp | (e: GestureTouchEvent) =\u003e void| - | Custom callback to handle on gesture touch up | No |\n| onGestureTouchesMove | (e: GestureTouchEvent) =\u003e void| - | Custom callback to handle on gesture touch move | No |\n| onGestureTouchesCancelled | (e: GestureTouchEvent) =\u003e void| - | Custom callback to handle on gesture touch cancelled | No | --\u003e\n\n### ModalSheetStack\n\nThe `ModalSheetStack` component is a modal sheet that can be opened and dismissed. It creates a modal sheet effect similar to the iOS modal sheet.\n\n\n#### Props\n| Name | Type | Default  | Description | Required |\n| --- | --- | --- | --- | --- |\n| ref | React.RefObject\\\u003cModalSheetStackRef\u003e | - | Ref for the modal sheet | Yes |\n| name | string | - | The name of the modal sheet | Yes |\n| children | ReactNode | - | The children components | Kinda yeah |\n| containerStyle | string | - | Styles for the modal sheet container | No |\n| noHandle | boolean | false | Hide the handle | No |\n| onDismiss | () =\u003e void | - | Callback when the modal sheet is dismissed | No |\n| enableDragToDismiss | boolean | true | Enable dragging to dismiss the modal sheet | No |\n\u003c!-- | backdropColor | string | \"black\" | The color of the backdrop | No |\n| backdropOpacity | number | 0.4 | The opacity of the backdrop | No | --\u003e\n\n#### Methods\n\n| Name | Type | Description |\n| --- | --- | --- |\n| open | () =\u003e void | Open the modal sheet |\n| dismiss | () =\u003e void | Dismiss the modal sheet |\n\n\n\u003c!-- ## Hooks\n\n### useModalSheet\n\n\u003e [!WARNING]\n\u003e This is a work in progress and not yet fully implemented/functional\n\n| Name | Type | Description |\n| --- | --- | --- |\n| open | () =\u003e void | Open the modal sheet |\n| dismiss | () =\u003e void | Dismiss the modal sheet |\n| expand | (height?: number, disableSheetStack?: boolean) =\u003e void | expand to custom height |\n| minimize | (height?: number) =\u003e void | Minimize to custom height | --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorasan%2Fmodal-sheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorasan%2Fmodal-sheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorasan%2Fmodal-sheet/lists"}