Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

feat(mobile): support for native tabs

daniel31x133b946f1694c4
diff --git a/apps/mobile/app/(tabs)/_layout.tsx b/apps/mobile/app/(tabs)/_layout.tsx
index e8e4ee72..e4f7dd6f 100644
--- a/apps/mobile/app/(tabs)/_layout.tsx
+++ b/apps/mobile/app/(tabs)/_layout.tsx
@@ -1,10 +1,15 @@
-import { Tabs, useRouter } from "expo-router";
+import { useRouter } from "expo-router";
+import {
+ NativeTabs,
+ Icon,
+ Label,
+ VectorIcon,
+} from "expo-router/unstable-native-tabs";
import React, { useEffect } from "react";
import { ActivityIndicator, Platform, View } from "react-native";
-import TabBarBackground from "@/components/ui/TabBarBackground";
+import Ionicons from "@expo/vector-icons/Ionicons";
import { useColorScheme } from "nativewind";
import { rawTheme, ThemeName } from "@/lib/colors";
-import { Folder, Hash, House, Link, Settings } from "lucide-react-native";
import useAuthStore from "@/store/auth";
import { useUser } from "@linkwarden/router/user";
import { useConfig } from "@linkwarden/router/config";
@@ -37,70 +42,71 @@ export default function TabLayout() {
}
return (
- <Tabs
- screenOptions={{
- tabBarBackground: TabBarBackground,
- tabBarActiveTintColor: rawTheme[colorScheme as ThemeName].primary,
- tabBarInactiveTintColor: rawTheme[colorScheme as ThemeName].neutral,
- tabBarStyle: Platform.select({
- ios: {
- position: "absolute",
- borderTopWidth: 0,
- elevation: 0,
- backgroundColor: rawTheme[colorScheme as ThemeName]["base-200"],
- paddingLeft: 5,
- paddingRight: 5,
- },
- default: {
- borderTopWidth: 0,
- backgroundColor: rawTheme[colorScheme as ThemeName]["base-200"],
- elevation: 0,
- paddingLeft: 5,
- paddingRight: 5,
- },
- }),
- }}
+ <NativeTabs
+ labelVisibilityMode="labeled"
+ tintColor={rawTheme[colorScheme as ThemeName].primary}
+ backgroundColor={
+ Platform.OS === "android"
+ ? rawTheme[colorScheme as ThemeName]["base-200"]
+ : undefined
+ }
+ indicatorColor={rawTheme[colorScheme as ThemeName]["neutral-content"]}
+ minimizeBehavior="onScrollDown"
>
- <Tabs.Screen
- name="dashboard"
- options={{
- title: "Dashboard",
- headerShown: false,
- tabBarIcon: ({ color }) => <House size={24} color={color} />,
- }}
- />
- <Tabs.Screen
- name="links"
- options={{
- title: "Links",
- headerShown: false,
- tabBarIcon: ({ color }) => <Link size={24} color={color} />,
- }}
- />
- <Tabs.Screen
- name="collections"
- options={{
- title: "Collections",
- headerShown: false,
- tabBarIcon: ({ color }) => <Folder size={24} color={color} />,
- }}
- />
- <Tabs.Screen
- name="tags"
- options={{
- title: "Tags",
- headerShown: false,
- tabBarIcon: ({ color }) => <Hash size={24} color={color} />,
- }}
- />
- <Tabs.Screen
- name="settings"
- options={{
- title: "Settings",
- headerShown: false,
- tabBarIcon: ({ color }) => <Settings size={24} color={color} />,
- }}
- />
- </Tabs>
+ <NativeTabs.Trigger name="dashboard">
+ <Label>Dashboard</Label>
+ <Icon
+ sf={{ default: "house", selected: "house.fill" }}
+ androidSrc={{
+ default: <VectorIcon family={Ionicons} name="home-outline" />,
+ selected: <VectorIcon family={Ionicons} name="home" />,
+ }}
+ />
+ </NativeTabs.Trigger>
+
+ <NativeTabs.Trigger name="links">
+ <Label>Links</Label>
+ <Icon
+ sf="link"
+ androidSrc={{
+ default: <VectorIcon family={Ionicons} name="link-outline" />,
+ selected: <VectorIcon family={Ionicons} name="link" />,
+ }}
+ />
+ </NativeTabs.Trigger>
+
+ <NativeTabs.Trigger name="collections">
+ <Label>Collections</Label>
+ <Icon
+ sf={{ default: "folder", selected: "folder.fill" }}
+ androidSrc={{
+ default: <VectorIcon family={Ionicons} name="folder-outline" />,
+ selected: <VectorIcon family={Ionicons} name="folder" />,
+ }}
+ />
+ </NativeTabs.Trigger>
+
+ <NativeTabs.Trigger name="tags">
+ <Label>Tags</Label>
+ <Icon
+ sf="number"
+ androidSrc={{
+ default: <VectorIcon family={Ionicons} name="pricetag-outline" />,
+ selected: <VectorIcon family={Ionicons} name="pricetag" />,
+ }}
+ />
+ </NativeTabs.Trigger>
+
+ <NativeTabs.Trigger name="settings">
+ <Label>Settings</Label>
+ <Icon
+ sf={{ default: "gearshape", selected: "gearshape.fill" }}
+ androidSrc={{
+ default: <VectorIcon family={Ionicons} name="settings-outline" />,
+ selected: <VectorIcon family={Ionicons} name="settings" />,
+ }}
+ />
+ </NativeTabs.Trigger>
+ </NativeTabs>
);
}
diff --git a/apps/mobile/app/(tabs)/collections/[id].tsx b/apps/mobile/app/(tabs)/collections/[id].tsx
index 194e32ba..acdf10ff 100644
--- a/apps/mobile/app/(tabs)/collections/[id].tsx
+++ b/apps/mobile/app/(tabs)/collections/[id].tsx
@@ -1,5 +1,5 @@
import { useLinks } from "@linkwarden/router/links";
-import { View, StyleSheet, Platform } from "react-native";
+import { View, Platform } from "react-native";
import useAuthStore from "@/store/auth";
import { useLocalSearchParams, useNavigation } from "expo-router";
import React, { useEffect } from "react";
@@ -49,7 +49,6 @@ export default function LinksScreen() {
return (
<View
- style={styles.container}
className="h-full bg-base-100"
collapsable={false}
collapsableChildren={false}
@@ -58,12 +57,3 @@ export default function LinksScreen() {
</View>
);
}
-
-const styles = StyleSheet.create({
- container: Platform.select({
- ios: {
- paddingBottom: 83,
- },
- default: {},
- }),
-});
diff --git a/apps/mobile/app/(tabs)/collections/_layout.tsx b/apps/mobile/app/(tabs)/collections/_layout.tsx
index 0035f270..71412591 100644
--- a/apps/mobile/app/(tabs)/collections/_layout.tsx
+++ b/apps/mobile/app/(tabs)/collections/_layout.tsx
@@ -32,8 +32,11 @@ export default function Layout() {
headerIconColor: colorScheme === "dark" ? "white" : "black",
},
headerShadowVisible: false,
- headerBlurEffect:
- colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
+ headerBlurEffect: isIOS26Plus
+ ? undefined
+ : colorScheme === "dark"
+ ? "systemMaterialDark"
+ : "systemMaterial",
headerLargeStyle: {
backgroundColor: isIOS26Plus
diff --git a/apps/mobile/app/(tabs)/collections/index.tsx b/apps/mobile/app/(tabs)/collections/index.tsx
index 052f3e5c..c14b050c 100644
--- a/apps/mobile/app/(tabs)/collections/index.tsx
+++ b/apps/mobile/app/(tabs)/collections/index.tsx
@@ -1,11 +1,4 @@
-import {
- View,
- StyleSheet,
- FlatList,
- Platform,
- Text,
- ActivityIndicator,
-} from "react-native";
+import { View, FlatList, Text, ActivityIndicator } from "react-native";
import useAuthStore from "@/store/auth";
import CollectionListing from "@/components/CollectionListing";
import { useLocalSearchParams } from "expo-router";
@@ -38,7 +31,6 @@ export default function CollectionsScreen() {
return (
<View
- style={styles.container}
className="h-full bg-base-100"
collapsable={false}
collapsableChildren={false}
@@ -83,12 +75,3 @@ export default function CollectionsScreen() {
</View>
);
}
-
-const styles = StyleSheet.create({
- container: Platform.select({
- ios: {
- paddingBottom: 83,
- },
- default: {},
- }),
-});
diff --git a/apps/mobile/app/(tabs)/dashboard/[section].tsx b/apps/mobile/app/(tabs)/dashboard/[section].tsx
index d8997d28..d118a1d5 100644
--- a/apps/mobile/app/(tabs)/dashboard/[section].tsx
+++ b/apps/mobile/app/(tabs)/dashboard/[section].tsx
@@ -1,5 +1,5 @@
import { useLinks } from "@linkwarden/router/links";
-import { View, StyleSheet, Platform } from "react-native";
+import { View, Platform } from "react-native";
import useAuthStore from "@/store/auth";
import { useLocalSearchParams, useNavigation } from "expo-router";
import React, { useEffect, useMemo } from "react";
@@ -58,7 +58,6 @@ export default function LinksScreen() {
return (
<View
- style={styles.container}
className="h-full bg-base-100"
collapsable={false}
collapsableChildren={false}
@@ -67,12 +66,3 @@ export default function LinksScreen() {
</View>
);
}
-
-const styles = StyleSheet.create({
- container: Platform.select({
- ios: {
- paddingBottom: 83,
- },
- default: {},
- }),
-});
diff --git a/apps/mobile/app/(tabs)/dashboard/_layout.tsx b/apps/mobile/app/(tabs)/dashboard/_layout.tsx
index 21de2a26..1a392d37 100644
--- a/apps/mobile/app/(tabs)/dashboard/_layout.tsx
+++ b/apps/mobile/app/(tabs)/dashboard/_layout.tsx
@@ -19,8 +19,11 @@ export default function Layout() {
headerLargeTitle: true,
headerTransparent: Platform.OS === "ios",
headerShadowVisible: false,
- headerBlurEffect:
- colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
+ headerBlurEffect: isIOS26Plus
+ ? undefined
+ : colorScheme === "dark"
+ ? "systemMaterialDark"
+ : "systemMaterial",
headerTintColor: colorScheme === "dark" ? "white" : "black",
headerLargeStyle: {
backgroundColor: isIOS26Plus
diff --git a/apps/mobile/app/(tabs)/dashboard/index.tsx b/apps/mobile/app/(tabs)/dashboard/index.tsx
index b43191fd..9d41b076 100644
--- a/apps/mobile/app/(tabs)/dashboard/index.tsx
+++ b/apps/mobile/app/(tabs)/dashboard/index.tsx
@@ -157,17 +157,9 @@ export default function DashboardScreen() {
}
const styles = StyleSheet.create({
- container: Platform.select({
- ios: {
- paddingBottom: 49,
- flexDirection: "column",
- gap: 15,
- paddingVertical: 20,
- },
- default: {
- flexDirection: "column",
- gap: 15,
- paddingVertical: 20,
- },
- }),
+ container: {
+ flexDirection: "column",
+ gap: 15,
+ paddingVertical: 20,
+ },
});
diff --git a/apps/mobile/app/(tabs)/links/_layout.tsx b/apps/mobile/app/(tabs)/links/_layout.tsx
index e16c64e4..60e18e11 100644
--- a/apps/mobile/app/(tabs)/links/_layout.tsx
+++ b/apps/mobile/app/(tabs)/links/_layout.tsx
@@ -32,8 +32,11 @@ export default function Layout() {
headerIconColor: colorScheme === "dark" ? "white" : "black",
},
headerShadowVisible: false,
- headerBlurEffect:
- colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
+ headerBlurEffect: isIOS26Plus
+ ? undefined
+ : colorScheme === "dark"
+ ? "systemMaterialDark"
+ : "systemMaterial",
headerLargeStyle: {
backgroundColor: isIOS26Plus
? "transparent"
diff --git a/apps/mobile/app/(tabs)/links/index.tsx b/apps/mobile/app/(tabs)/links/index.tsx
index 1c9a93e5..ceeedfe6 100644
--- a/apps/mobile/app/(tabs)/links/index.tsx
+++ b/apps/mobile/app/(tabs)/links/index.tsx
@@ -1,5 +1,5 @@
import { useLinks } from "@linkwarden/router/links";
-import { View, StyleSheet, Platform } from "react-native";
+import { View } from "react-native";
import useAuthStore from "@/store/auth";
import { useLocalSearchParams } from "expo-router";
import React from "react";
@@ -19,7 +19,6 @@ export default function LinksScreen() {
return (
<View
- style={styles.container}
className="h-full bg-base-100"
collapsable={false}
collapsableChildren={false}
@@ -28,12 +27,3 @@ export default function LinksScreen() {
</View>
);
}
-
-const styles = StyleSheet.create({
- container: Platform.select({
- ios: {
- paddingBottom: 83,
- },
- default: {},
- }),
-});
diff --git a/apps/mobile/app/(tabs)/settings/_layout.tsx b/apps/mobile/app/(tabs)/settings/_layout.tsx
index 32c0b4c8..78bfe617 100644
--- a/apps/mobile/app/(tabs)/settings/_layout.tsx
+++ b/apps/mobile/app/(tabs)/settings/_layout.tsx
@@ -19,8 +19,11 @@ export default function Layout() {
headerTintColor: colorScheme === "dark" ? "white" : "black",
headerShadowVisible: false,
headerBackTitle: "Back",
- headerBlurEffect:
- colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
+ headerBlurEffect: isIOS26Plus
+ ? undefined
+ : colorScheme === "dark"
+ ? "systemMaterialDark"
+ : "systemMaterial",
headerLargeStyle: {
backgroundColor: isIOS26Plus
? "transparent"
@@ -48,8 +51,11 @@ export default function Layout() {
headerTitle: "Preferred Collection",
headerLargeTitle: false,
headerTransparent: Platform.OS === "ios",
- headerBlurEffect:
- colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
+ headerBlurEffect: isIOS26Plus
+ ? undefined
+ : colorScheme === "dark"
+ ? "systemMaterialDark"
+ : "systemMaterial",
...(isIOS26Plus
? {
headerBackground: () => (
diff --git a/apps/mobile/app/(tabs)/settings/index.tsx b/apps/mobile/app/(tabs)/settings/index.tsx
index b6a2cb15..cad0093b 100644
--- a/apps/mobile/app/(tabs)/settings/index.tsx
+++ b/apps/mobile/app/(tabs)/settings/index.tsx
@@ -393,13 +393,7 @@ export default function SettingsScreen() {
}
const styles = StyleSheet.create({
- container: Platform.select({
- ios: {
- flex: 1,
- paddingBottom: 83,
- },
- default: {
- flex: 1,
- },
- }),
+ container: {
+ flex: 1,
+ },
});
diff --git a/apps/mobile/app/(tabs)/tags/[id].tsx b/apps/mobile/app/(tabs)/tags/[id].tsx
index c2dba6d4..d4f9c9d8 100644
--- a/apps/mobile/app/(tabs)/tags/[id].tsx
+++ b/apps/mobile/app/(tabs)/tags/[id].tsx
@@ -1,5 +1,5 @@
import { useLinks } from "@linkwarden/router/links";
-import { View, StyleSheet, Platform } from "react-native";
+import { View, Platform } from "react-native";
import useAuthStore from "@/store/auth";
import { useLocalSearchParams, useNavigation } from "expo-router";
import React, { useEffect } from "react";
@@ -47,7 +47,6 @@ export default function LinksScreen() {
return (
<View
- style={styles.container}
className="h-full bg-base-100"
collapsable={false}
collapsableChildren={false}
@@ -56,12 +55,3 @@ export default function LinksScreen() {
</View>
);
}
-
-const styles = StyleSheet.create({
- container: Platform.select({
- ios: {
- paddingBottom: 83,
- },
- default: {},
- }),
-});
diff --git a/apps/mobile/app/(tabs)/tags/_layout.tsx b/apps/mobile/app/(tabs)/tags/_layout.tsx
index 5fe8d453..255dac68 100644
--- a/apps/mobile/app/(tabs)/tags/_layout.tsx
+++ b/apps/mobile/app/(tabs)/tags/_layout.tsx
@@ -31,8 +31,11 @@ export default function Layout() {
headerIconColor: colorScheme === "dark" ? "white" : "black",
},
headerShadowVisible: false,
- headerBlurEffect:
- colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
+ headerBlurEffect: isIOS26Plus
+ ? undefined
+ : colorScheme === "dark"
+ ? "systemMaterialDark"
+ : "systemMaterial",
headerLargeStyle: {
backgroundColor: isIOS26Plus
? "transparent"
diff --git a/apps/mobile/app/(tabs)/tags/index.tsx b/apps/mobile/app/(tabs)/tags/index.tsx
index bfe1e745..953abdb2 100644
--- a/apps/mobile/app/(tabs)/tags/index.tsx
+++ b/apps/mobile/app/(tabs)/tags/index.tsx
@@ -1,11 +1,4 @@
-import {
- View,
- StyleSheet,
- FlatList,
- Platform,
- Text,
- ActivityIndicator,
-} from "react-native";
+import { View, FlatList, Text, ActivityIndicator } from "react-native";
import useAuthStore from "@/store/auth";
import TagListing from "@/components/TagListing";
import { useLocalSearchParams } from "expo-router";
@@ -57,7 +50,6 @@ export default function TagsScreen() {
return (
<View
- style={styles.container}
className="h-full bg-base-100"
collapsable={false}
collapsableChildren={false}
@@ -117,12 +109,3 @@ export default function TagsScreen() {
</View>
);
}
-
-const styles = StyleSheet.create({
- container: Platform.select({
- ios: {
- paddingBottom: 83,
- },
- default: {},
- }),
-});
diff --git a/apps/mobile/components/ui/TabBarBackground.ios.tsx b/apps/mobile/components/ui/TabBarBackground.ios.tsx
deleted file mode 100644
index a0b6f703..00000000
--- a/apps/mobile/components/ui/TabBarBackground.ios.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { useBottomTabBarHeight } from "@react-navigation/bottom-tabs";
-import { BlurView } from "expo-blur";
-import { StyleSheet } from "react-native";
-import { useSafeAreaInsets } from "react-native-safe-area-context";
-
-export default function BlurTabBarBackground() {
- return (
- <BlurView
- // System chrome material automatically adapts to the system's theme
- // and matches the native tab bar appearance on iOS.
- tint="systemChromeMaterial"
- intensity={100}
- style={StyleSheet.absoluteFill}
- />
- );
-}
-
-export function useBottomTabOverflow() {
- const tabHeight = useBottomTabBarHeight();
- const { bottom } = useSafeAreaInsets();
- return tabHeight - bottom;
-}
diff --git a/apps/mobile/components/ui/TabBarBackground.tsx b/apps/mobile/components/ui/TabBarBackground.tsx
deleted file mode 100644
index 70d1c3c0..00000000
--- a/apps/mobile/components/ui/TabBarBackground.tsx
+++ /dev/null
@@ -1,6 +0,0 @@
-// This is a shim for web and Android where the tab bar is generally opaque.
-export default undefined;
-
-export function useBottomTabOverflow() {
- return 0;
-}
diff --git a/apps/mobile/package.json b/apps/mobile/package.json
index ce13262a..5fbe86cb 100644
--- a/apps/mobile/package.json
+++ b/apps/mobile/package.json
@@ -71,7 +71,7 @@
"react-native-purchases": "^10.2.0",
"react-native-reanimated": "4.1.1",
"react-native-safe-area-context": "^5.7.0",
- "react-native-screens": "~4.23.0",
+ "react-native-screens": "~4.19.0",
"react-native-svg": "15.12.1",
"react-native-web": "^0.21.0",
"react-native-webview": "13.15.0",
diff --git a/yarn.lock b/yarn.lock
index 3270398b..346d77f5 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5298,7 +5298,7 @@ __metadata:
react-native-purchases: "npm:^10.2.0"
react-native-reanimated: "npm:4.1.1"
react-native-safe-area-context: "npm:^5.7.0"
- react-native-screens: "npm:~4.23.0"
+ react-native-screens: "npm:~4.19.0"
react-native-svg: "npm:15.12.1"
react-native-web: "npm:^0.21.0"
react-native-webview: "npm:13.15.0"
@@ -18979,16 +18979,16 @@ __metadata:
languageName: node
linkType: hard
-"react-native-screens@npm:~4.23.0":
- version: 4.23.0
- resolution: "react-native-screens@npm:4.23.0"
+"react-native-screens@npm:~4.19.0":
+ version: 4.19.0
+ resolution: "react-native-screens@npm:4.19.0"
dependencies:
react-freeze: "npm:^1.0.0"
warn-once: "npm:^0.1.0"
peerDependencies:
react: "*"
react-native: "*"
- checksum: 10c0/91c0c9840d36923adc49cb0d463f4e6b63d63060245029d49f8b80d82a405fcecce2196695c993f214c5ecb945e1b0bfb8ec0b8b44845b1438b8fac0d9ed53a7
+ checksum: 10c0/e66328c8782ad4af352c418e5a4ae0cd5011d5010a9fad23e9740353d8076027c197d344b7465c5d529d862954dc80d9d0db444846e59cc1bee46a5459817562
languageName: node
linkType: hard