Skip to content

Tabs Indicator doesn't get my palette's color #26230

@neelbrahmakshatriya

Description

@neelbrahmakshatriya

I have changed the whole palette in the theme.

I am using Tabs and they doesn't work as they should.
The text inside all the Tabs has my palette's color.
But Tabs indicator doesn't get my palette's color and gets color from your palette.

Here is the image of the Tabs:
material-ui-tabs

I tried this in codesandbox and even then I got the same result (color comes from your palette).
Here is the link to my codesandbox:
https://codesandbox.io/s/material-ui-tabs-ugr7k?file=/demo.tsx

I also tried to override Tabs indicator in may app using:

MuiTabs: {
  styleOverrides: {
    indicator: {
      backgroundColor: palette.primary.main
    }
  }
}

but this doesn't work either.

And if I use:

MuiTabs: {
  styleOverrides: {
    root: {
      '& .MuiTabs-indicator': {
        backgroundColor: palette.primary.main
      }
    }
  }
}

then tabs with secondary color also gets primary color. There is no extra class for secondary variant with the Tabs component so that I can update secondary color further.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions