I want to know how to change the background color of this tab bar as Ionic 4.
I tried to add the --background: white;
in ion-tab/ion-tabs but it doesn't work.
<ion-tabs>
<ion-tab label="Home" icon="home" href="/tabs/(home:home)">
<ion-router-outlet name="home"></ion-router-outlet>
</ion-tab>
<ion-tab label="About" icon="information-circle" href="/tabs/(about:about)">
<ion-router-outlet name="about"></ion-router-outlet>
</ion-tab>
<ion-tab label="Contact" icon="contacts" href="/tabs/(contact:contact)">
<ion-router-outlet name="contact"></ion-router-outlet>
</ion-tab>
</ion-tabs>
I'm so curious about this new Ionic 4 :( Please help...
Ionic 4+
Give
ion-tab
a class name likeNow in the scss file provide the background-color for the class named tab
You need to add properties called color. Ionic 4 has predefined colors:
More info in documentation
Sample usage:
<ion-tabs main color="primary">