Setting height on Stack header #881
Replies: 16 comments 3 replies
-
Having the same issue. @stefanahman were you able to work around it? |
Beta Was this translation helpful? Give feedback.
-
same issue |
Beta Was this translation helpful? Give feedback.
-
Same issue |
Beta Was this translation helpful? Give feedback.
-
Same issue. Pretty frustrating that this is still an issue |
Beta Was this translation helpful? Give feedback.
-
Pretty frustrating so many people experiencing same issue. I had to switch to a JSstack but would prefer the native stack. |
Beta Was this translation helpful? Give feedback.
-
Here is an example of how I worked around this issue. Basically I used the FYI, I am using NativeWind to add import { Stack, useRouter } from "expo-router";
import { styled } from "nativewind";
import { View } from "react-native";
import { NotificationButtonContainer } from "@/features/notifications/components";
import { IconButton } from "@/features/shared/components";
const StyledView = styled(View);
export default function HomeStack() {
const router = useRouter();
return (
<Stack
screenOptions={{
headerTintColor: "white",
headerBackground: () => <StyledView className="h-14 bg-primary" />,
headerTransparent: true,
headerLeft: () => (
<IconButton iconName="arrow-left" onPress={() => router.back()} />
),
headerRight: () => <NotificationButtonContainer />,
contentStyle: { paddingTop: 50 },
}}
>
<Stack.Screen
name="index"
options={{
title: "Home",
}}
/>
</Stack>
);
} I hope that helps 🙏 |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm switching from
react-navigation
toexpo-router
and having problem with specifying header height on my stack header.react-navigation
has support for this andexpo-router
when it comes toTabs
.Error:
headerStyle
forStack
:headerStyle
forTabs
:Any idea how to do this or why it has been removed in
expo-router
?Beta Was this translation helpful? Give feedback.
All reactions