Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change antd Table header color

I tried to target base classes as below which doesn't work.

.ant-table .ant-table-container .ant-table-content table thead.ant-table-thead {
  background-color: green !important;
}

Is there a working way to achieve this? enter image description here

Corresponding JSX:

<Table columns={columns} dataSource={dataSource} />

Antd Table Docs: https://ant.design/components/table/

like image 326
Anjan Talatam Avatar asked Dec 10 '25 21:12

Anjan Talatam


1 Answers

Background Color for Table Header is come from Table Cell. Try using below rule.

.ant-table-thead .ant-table-cell {
  background-color: green;
}
like image 127
Rithick Avatar answered Dec 13 '25 10:12

Rithick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!