Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

597
Visualizações
How to change Botton tab bar Background Color in React Native?

I'm using @react-navigation/bottom-tabs Package. But I don't know how to change background color of the tab bar. Here is my Code.

import React from "react";
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import Home from "./TabScreen/Home";
import Category from "./TabScreen/Category";
import Search from "./TabScreen/Search";
import Profile from "./TabScreen/Profile";
import Colors from "../../../Style_Sheet/Colors";

const Tab = createBottomTabNavigator();

const Tabs =()=>{
  return(
    <Tab.Navigator tabBarPosition="bottom" barStyle={{ backgroundColor: '#0000' }}>
      <Tab.Screen name="Home" component={Home} options={{headerTitle:"Explore",headerTintColor:Colors.white,}}/>
      <Tab.Screen name="Category" component={Category} />
      <Tab.Screen name="Search" component={Search} />
      <Tab.Screen name="Profile" component={Profile} />

    </Tab.Navigator>
  )
}
export default Tabs;

I am adding under then Tab.Navigator tag but it's not working.

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

For version 6 you have to add screenOptions like this in Tab.Navigator

 <Tab.Navigator 
screenOptions={{
        tabBarStyle: {
          backgroundColor: '#000',
        },
      }}>
</Tab.Navigator>
about 4 years ago · Juan Pablo Isaza Relatório

0

If

<Tab.Navigator 
screenOptions={{
        tabBarStyle: {
          backgroundColor: '#fff',
        },
      }}>
</Tab.Navigator>

not working then change the Theme Color, The below code will work when assigning border-radius and can't change the background color enter image description here

1.import {NavigationContainer, DefaultTheme} from '@react-navigation/native';

2.

const MyTheme = {
  ...DefaultTheme,
  colors: {
    ...DefaultTheme.colors,
    background: '#fff',
  },
};
  1. <NavigationContainer theme={MyTheme}>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda