I need to add a border color and make the border thicker for antd checkbox.
<Checkbox>Add</Checkbox>
css:
.ant-checkbox-checked .ant-checkbox-inner {
background-color: red;
border-color: red;
}
The above code helped me changed the checkbox when only 'checked'
I also tried,
outline : 2px solid red;
How can I change the width and color of the border for a antd checkbox?
To change the checkbox when not checked all you have to do is use:
.ant-checkbox-inner {
width: 24px;
height: 24px;
border-width: 3px;
border-radius: 5px;
border-color: red;
}
But to style it while it's checked :
.ant-checkbox-checked .ant-checkbox-inner {
background-color: blue;
border-color: blue;
width: 24px;
height: 24px;
font-size: 24px;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.