├── .gitignore ├── .prettierrc ├── README.md ├── app.json ├── app ├── (tabs) │ ├── _layout.tsx │ ├── explore.tsx │ ├── index.tsx │ └── profile.tsx ├── +html.tsx └── _layout.tsx ├── assets ├── explore.jpg ├── home.jpg └── profile.jpg ├── babel.config.js ├── components └── TabBarButton.tsx ├── constants └── Colors.ts ├── icons ├── ExploreIcon.tsx ├── HomeIcon.tsx └── ProfileIcon.tsx ├── metro.config.js ├── package.json ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files 2 | 3 | # dependencies 4 | node_modules/ 5 | 6 | # Expo 7 | .expo/ 8 | dist/ 9 | web-build/ 10 | 11 | # Native 12 | *.orig.* 13 | *.jks 14 | *.p8 15 | *.p12 16 | *.key 17 | *.mobileprovision 18 | 19 | # Metro 20 | .metro-health-check* 21 | 22 | # debug 23 | npm-debug.* 24 | yarn-debug.* 25 | yarn-error.* 26 | 27 | # macOS 28 | .DS_Store 29 | *.pem 30 | 31 | # local env files 32 | .env*.local 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | 37 | # @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb 38 | # The following patterns were generated by expo-cli 39 | 40 | expo-env.d.ts 41 | # @end expo-cli 42 | 43 | ios 44 | android -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Expo Router tabs with Reanimated demo 2 | 3 | https://github.com/kacperkapusciak/reanimated-expo-router-tabs/assets/39658211/12f73b62-f5fd-4830-8cb4-db8010f864c9 4 | 5 | ## Run instructions: 6 | 7 | ### Clone and cd into the project 8 | 9 | ```sh 10 | git clone https://github.com/kacperkapusciak/reanimated-expo-router-tabs.git 11 | cd reanimated-expo-router-tabs 12 | ``` 13 | 14 | ### Install dependencies 15 | 16 | ```sh 17 | npm install 18 | ``` 19 | 20 | ### Run the project using Expo Go 21 | 22 | ```sh 23 | npx expo start -c 24 | ``` 25 | 26 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "reanimated-expo-router-tabs", 4 | "slug": "reanimated-expo-router-tabs", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "scheme": "myapp", 8 | "userInterfaceStyle": "automatic", 9 | "assetBundlePatterns": [ 10 | "**/*" 11 | ], 12 | "plugins": [ 13 | "expo-router" 14 | ], 15 | "experiments": { 16 | "typedRoutes": true 17 | }, 18 | "ios": { 19 | "bundleIdentifier": "com.kacperkapusciak.reanimated-expo-router-tabs" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/(tabs)/_layout.tsx: -------------------------------------------------------------------------------- 1 | import { Tabs, usePathname } from "expo-router"; 2 | import { StyleSheet } from "react-native"; 3 | 4 | import { BlurView } from "expo-blur"; 5 | import { TabBarButton } from "../../components/TabBarButton"; 6 | import { HomeIcon } from "../../icons/HomeIcon"; 7 | import { ExploreIcon } from "../../icons/ExploreIcon"; 8 | import { ProfileIcon } from "../../icons/ProfileIcon"; 9 | 10 | export default function TabLayout() { 11 | const pathname = usePathname(); 12 | return ( 13 | ( 19 | 24 | ), 25 | }} 26 | > 27 | ( 31 | 37 | ), 38 | }} 39 | /> 40 | ( 44 | 50 | ), 51 | }} 52 | /> 53 | ( 57 | 63 | ), 64 | }} 65 | /> 66 | 67 | ); 68 | } 69 | 70 | const styles = StyleSheet.create({ 71 | tabBarLabelStyle: { 72 | fontSize: 11, 73 | }, 74 | tabBarStyle: { 75 | position: "absolute", 76 | borderTopWidth: 0, 77 | }, 78 | }); 79 | -------------------------------------------------------------------------------- /app/(tabs)/explore.tsx: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from "react-native"; 2 | import { Image } from "expo-image"; 3 | 4 | const image = require("../../assets/explore.jpg"); 5 | 6 | export default function ExploreScreen() { 7 | return ; 8 | } 9 | 10 | const styles = StyleSheet.create({ 11 | image: { 12 | width: 400, 13 | height: 860, 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /app/(tabs)/index.tsx: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from "react-native"; 2 | import { Image } from "expo-image"; 3 | 4 | const image = require("../../assets/home.jpg"); 5 | 6 | export default function HomeScreen() { 7 | return ; 8 | } 9 | 10 | const styles = StyleSheet.create({ 11 | image: { 12 | width: 400, 13 | height: 860, 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /app/(tabs)/profile.tsx: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from "react-native"; 2 | import { Image } from "expo-image"; 3 | 4 | const image = require("../../assets/profile.jpg"); 5 | 6 | export default function ProfileScreen() { 7 | return ; 8 | } 9 | 10 | const styles = StyleSheet.create({ 11 | image: { 12 | width: 400, 13 | height: 860, 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /app/+html.tsx: -------------------------------------------------------------------------------- 1 | import { ScrollViewStyleReset } from 'expo-router/html'; 2 | 3 | // This file is web-only and used to configure the root HTML for every 4 | // web page during static rendering. 5 | // The contents of this function only run in Node.js environments and 6 | // do not have access to the DOM or browser APIs. 7 | export default function Root({ children }: { children: React.ReactNode }) { 8 | return ( 9 | 10 | 11 | 12 | 13 | 14 | {/* 15 | This viewport disables scaling which makes the mobile website act more like a native app. 16 | However this does reduce built-in accessibility. If you want to enable scaling, use this instead: 17 | 18 | */} 19 | 23 | {/* 24 | Disable body scrolling on web. This makes ScrollView components work closer to how they do on native. 25 | However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line. 26 | */} 27 | 28 | 29 | {/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */} 30 |