Search code examples
reactjsantd

How to change the color of a check box in antd?


import { Checkbox } from 'antd' 

<Checkbox style={{ color: 'red', backgroundColor: 'black' }}>Dr John</Checkbox>

How do I change the color of the check box, not the label 'Dr John'? The style above only changes the styles of the label, not the check box.


Solution

  • You can use simple css

    .ant-checkbox-checked .ant-checkbox-inner {
      background-color: red;
      border-color: red;
    }