ionic 4 tabs how to change background color of selected tabs

ionic 4 selected tab color
ionic 4 set active tab
ion router outlet background color
ionic tabs theme
ion-tabs default
ionic 1 tabs
ionic 4 styling
ion-tab button width

can any one help me on this: I am already add this in 'global.scss'

.tab-btn-selected {
    background: rgb(134,31,194);
    color: rgb(134,31,194);
    --color-selected: rgb(134,31,194);

.tab-btn-selected[aria-selected=true] {
    color: #fff; /*your  text color */
    background: rgb(134,31,194); /* your background color*/

but nothing is changed.

I am using ionic 4 with stenciljs. My <ion-tab-button/> had the following class list when unselected:

class="tab-has-icon tab-has-icon-only tab-layout-icon-bottom hydrated"

then when selected:

class="tab-has-icon tab-has-icon-only tab-layout-icon-bottom hydrated tab-selected"

my Component had the following properties:

  tag: 'app-task',
  styleUrl: 'app-task.css'

so I added the following to app-task.css and was able to change the font and background color:

  background: rgb(134,31,194) !important;
  color: white !important;

I want to change the color of the active tab. The solution would be to override the --color-selected just for the ion-tabbar element. ion-tabs{ --ion-tabbar-​background-color: #1c1c21; // already exists --ion-tabbar-color:  Hi, I am using Ionic to develop a mobile app. I used Ionic tabs template. On the bottom of the screen, the background of tab is still white. I don't know how to change the background. I am only change the color of the icon with the following code. How can I change the background tab color.

I did it on variables.scss:

--ion-tabbar-text-color-active: rgb(134,31,194);

For the moment, I can only change color for all tabs. So you want to dynamically change the color of the tabbar based on the active tab. Advertisements. Previous Page. Next Page. Ionic tabs are most of the time used for mobile navigation. Styling is optimized for different platforms. This means that on android devices, tabs will be placed at the top of the screen, while on IOS it will be at the bottom. There are different ways of creating tabs.

Just use this in your tabspage SCSS in Ionic 4,

    --color-selected: #000 !important; ( use your favourite color instead of #000 ).

Sorry for such a basic question, but I'm having trouble changing the color of the tabs In many screenshots, I've seen the tabs colored such that the tab background Change the color of the tabs text $tab-button-md-active-color: color($colors,  .selected { color: #YOURCOLORHIGHLIGHT !important; } super-tab-button { color: #YOURDEFAULTCOLOR; } When the tab is selected, a css class called .selected is added to the tab button, só just add the code above in your css file, but is important not set the toolbarColor property in the Super Tabs component

In ionic 4 with angular 8 I got it work in web browsers like this (not tested on mobile devices):

in global.css I added:

ion-tab-button {
  --ripple-color: var(--ion-color-medium);
  --color: var(--ion-color-dark);
  --color-selected: var(--ion-color-medium);
} {
  --background: var(--ion-color-dark) !important;
  --color-selected: var(--ion-color-light);

Should the same work for the icons themselves? But maybe you have to change the active tab color in your src/theme/variables.scss file. I was thinking it was an issue with the css on android, but check out the tabs css docs. Basically tabs-positive sets the foreground color (the icons itself). The docs are settings the foreground color in the css, but the example shows the background color being set. Confusing I suppose :)



  <ion-tab-bar slot="bottom">
    <ion-tab-button tab="index">
      <ion-icon name="list"></ion-icon>

    <ion-tab-button class="favorites-button" tab="favorites">
      <ion-icon name="heart"></ion-icon>




ion-tab-button.favorites-button {
    --color-selected: red;

.tabs-md .tab-button[aria-selected=true] .tab-button-icon { color: $tabs-color I also couldn't find a different way to change active icon's color for tabs. .tabs-md[​tabsHighlight="true"] .tab-highlight { background-color: red; }. You can use the selectedIndex property to set the index on the <ion-tabs> element, or you can call select() from the Tabs instance after creation. See usage below for more information. Usage

Change color of ion-icon in tabs menu with css in Ionic 4.9 ion-tab-button { --​color-selected: #somecolor; --color: #somecolor; } So I went through all my svg files I used for the Tabs and deleted manually this fill styling. How do i Change Color Of Windows Tab (Windows 10) Hello Guys I was wondering how do i change my color of a windows tab atm it looks like this i'd like to change it to blue. I tried playing around with the settings and nothing seems to work it looks like windows 10 can only change taskbar and start menu color.

For more information on colors, see theming . Attribute, color. Type, string | undefined. mode. Description. Sass variables go hand in hand with Ionic. With some CSS frameworks, you have to create a new stylesheet and override their styles to change the look of your application. In Ionic, you can modify the Sass directly, so that the CSS file that gets generated has the customization you want.

--ion-tabbar-background-color: var(--ion-color-primary); 4.2.1 Active tab color in iOS issue #16057. Closed Ionic 4 - How can I change .tab-btn padding?? #​15963. Closed ionic4: allow custom icons for ion-tab #14540. Throughout this Ionic 4 tutorial, we'll learn how to use the latest version of Ionic — Ionic 4 which is now in RC.Starting with Ionic 4, Ionic is going framework agnostic, which means you can use it with any framework or no one at all i.e with plain vanilla JavaScript and native web components (custom elements) supported by modern web browsers.