首页 > 解决方案 > 如何更改反应导航底部标签栏中的高度?

问题描述

海拔在这里

我想改变反应导航底部标签栏的高度,我想改变底部标签栏的高度。

标签: react-nativereact-navigation

解决方案


Ciao,假设您正在使用createBottomTabNavigator创建底部选项卡导航器,您可以使用如下选项自定义外观tabBarOptions

const MyTabNavigation = createBottomTabNavigator({
  ... // here your screens
},
{
  animationEnabled: true,  // maybe you want an animation?
  tabBarPosition: 'bottom', // tab bar is on bottom of the screen
  tabBarOptions: {   // here your style customization
    showLabel: true,  // you want ot show label under the icon?
    style:{
      elevation: 3,   // here set your elevation
      height: 50      // here set your height
    },
  },
});

推荐阅读