Search code examples
reactjsantd

ANTD: How to make input border with disable change color when error?


I have an Input component inside Form.item and input is disabled, I want input border to change color when error. How to do that?


Solution

  • You can change the default disabled border-color by adding the following css to your app:

    .ant-input-status-error.ant-input-disabled,
    .ant-input-status-error.ant-input-disabled:hover {
      border-color: #ff4d4f;
    }
    

    You can take a look at this sandbox for a live working example of this solution.