{"id":50987506,"url":"https://github.com/adebayoileri/universal-bottom-sheet","last_synced_at":"2026-06-19T21:30:50.186Z","repository":{"id":342703771,"uuid":"815105844","full_name":"adebayoileri/universal-bottom-sheet","owner":"adebayoileri","description":"✨ Bottom Sheet component  powered by  Gorhom Bottom Sheet + Vaul for native \u0026 web platforms.","archived":false,"fork":false,"pushed_at":"2025-10-09T20:30:50.000Z","size":23681,"stargazers_count":55,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-07T03:58:40.464Z","etag":null,"topics":["bottom-sheet","modal","react","react-native","sheet","universal","universal-react"],"latest_commit_sha":null,"homepage":"https://universal-bottom-sheet-web.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adebayoileri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-14T11:13:08.000Z","updated_at":"2026-01-12T08:14:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/adebayoileri/universal-bottom-sheet","commit_stats":null,"previous_names":["adebayoileri/universal-bottom-sheet"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/adebayoileri/universal-bottom-sheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adebayoileri%2Funiversal-bottom-sheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adebayoileri%2Funiversal-bottom-sheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adebayoileri%2Funiversal-bottom-sheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adebayoileri%2Funiversal-bottom-sheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adebayoileri","download_url":"https://codeload.github.com/adebayoileri/universal-bottom-sheet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adebayoileri%2Funiversal-bottom-sheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34549340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bottom-sheet","modal","react","react-native","sheet","universal","universal-react"],"created_at":"2026-06-19T21:30:47.557Z","updated_at":"2026-06-19T21:30:50.181Z","avatar_url":"https://github.com/adebayoileri.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Universal Bottom Sheet\nA bottom sheet component that combines [Gorhom Bottom Sheet](https://github.com/gorhom/react-native-bottom-sheet) and [Vaul](https://github.com/emilkowalski/vaul) for seamless and responsive experience across both mobile and web.\n\n![Bottom Sheet](./github.gif)\n\n\u003e **Note:** This is not a standalone package. It is a wrapper around Gorhom Bottom Sheet and Vaul for use across both mobile and web. You need to install Gorhom Bottom Sheet and Vaul separately to use this component.\n\n\n### Installation\nI recommend following the [installation guide](https://ui.gorhom.dev/components/bottom-sheet/) for Gorhom's Bottom Sheet\n\n```bash\nnpm install @gorhom/bottom-sheet@^4\n```\nor\n```bash\nyarn add @gorhom/bottom-sheet@^4\n\n```\n### Peer Dependencies\nMake sure to install the following peer dependencies\n```bash\nnpm install react-native-reanimated react-native-gesture-handler\n```\nor\n```bash\nyarn add react-native-reanimated react-native-gesture-handler\n```\nor with expo\n```bash\nnpx expo install react-native-reanimated react-native-gesture-handler\n```\n### Web Support\nMake sure to install the following dependencies\n```bash\nnpm install vaul\n```\nor\n```bash\nyarn add vaul\n```\n\n### Styling with NativeWind (Optional)\n\nThis example uses [NativeWind](https://www.nativewind.dev/v4/overview/) for styling. You can use any other styling library of your choice.\n\nFollow the installation guide [here](https://www.nativewind.dev/v4/getting-started/react-native)\n\n\n### Usage\nAn example usage of component is shown below:\n\nThe `ui/bottom-sheet` module exports the following components:\n\n- `BottomSheetModal`\n- `BottomSheetModalProvider`\n- `BottomSheetView`\n- `BottomSheetTrigger`\n- `BottomSheetHandle`\n- `BottomSheetScrollView`\n\n\nThe files can be found in the [`ui/bottom-sheet`](https://github.com/adebayoileri/universal-bottom-sheet/tree/main/packages/ui/bottom-sheet) directory. Copy the files to your project and import them as shown below:\n\n```tsx\n\"use client\";\n\nimport React, { useCallback, useMemo, useRef } from \"react\";\nimport { Text } from \"ui/text\";\nimport { View } from \"ui/view\";\nimport {\n  BottomSheetModal,\n  BottomSheetView,\n  BottomSheetTrigger,\n  BottomSheetHandle,\n} from \"ui/bottom-sheet\";\nimport { Pressable, Platform } from \"react-native\";\nimport { useSharedValue } from \"react-native-reanimated\";\n\nexport function Home() {\n  const [isOpen, setIsOpen] = React.useState(false);\n\n  const animatedIndex = useSharedValue\u003cnumber\u003e(0);\n  const animatedPosition = useSharedValue\u003cnumber\u003e(0);\n  // ref\n  const bottomSheetModalRef = useRef\u003cBottomSheetModal\u003e(null);\n\n  // bottomSheetModalRef\n  console.log({ bottomSheetModalRef });\n\n  // variables\n  const snapPoints = useMemo(() =\u003e [600, \"20%\", \"50%\", \"70%\", \"95%\"], []);\n\n  // callbacks\n  const handlePresentModalPress = useCallback(() =\u003e {\n    // bottomSheetWebRef.current?.focus();\n\n    if (isOpen) {\n      bottomSheetModalRef.current?.dismiss();\n      setIsOpen(false);\n    } else {\n      bottomSheetModalRef.current?.present();\n      setIsOpen(true);\n    }\n  }, [isOpen]);\n\n  const handleSheetChanges = useCallback((index: number) =\u003e {\n    console.log(\"handleSheetChanges\", index);\n  }, []);\n\n  return (\n    \u003cView className=\"flex flex-1 justify-center items-center\"\u003e\n      \u003cView className=\"p-1 rounded-md\"\u003e\n        {Platform.OS !== \"web\" \u0026\u0026 ( // Use this condition if you want to control the modal from outside for only mobile\n          \u003cPressable onPress={handlePresentModalPress}\u003e\n            \u003cText\u003ePresent Modal\u003c/Text\u003e\n          \u003c/Pressable\u003e\n        )}\n\n        \u003cBottomSheetModal\n          ref={bottomSheetModalRef}\n          index={1}\n          // open={isOpen} Use this prop if you want to control the modal from outside for web\n          snapPoints={snapPoints}\n          onChange={handleSheetChanges}\n          handleComponent={() =\u003e (\n            \u003cBottomSheetHandle\n              className=\"bg-green-300 mt-2\"\n              animatedIndex={animatedIndex}\n              animatedPosition={animatedPosition}\n            /\u003e\n          )}\n        \u003e\n          {Platform.OS === \"web\" \u0026\u0026 (\n            \u003c\u003e\n              \u003cBottomSheetTrigger\u003e\n                \u003cText\u003ePresent Modal\u003c/Text\u003e\n              \u003c/BottomSheetTrigger\u003e\n            \u003c/\u003e\n          )}\n          \u003cBottomSheetView className=\"flex-1 items-center\"\u003e\n            {Platform.OS === \"web\" \u0026\u0026 (\n              \u003cBottomSheetHandle\n                className=\"bg-gray-300 mt-2\"\n                animatedIndex={animatedIndex}\n                animatedPosition={animatedPosition}\n              /\u003e\n            )}\n            \u003cText className=\"mt-10\"\u003eAwesome 🎉\u003c/Text\u003e\n          \u003c/BottomSheetView\u003e\n        \u003c/BottomSheetModal\u003e\n      \u003c/View\u003e\n    \u003c/View\u003e\n  );\n}\n```\n### Author\n\n#### [Adebayo Ilerioluwa](https://github.com/adebayoileri)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadebayoileri%2Funiversal-bottom-sheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadebayoileri%2Funiversal-bottom-sheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadebayoileri%2Funiversal-bottom-sheet/lists"}