Is there any way to change style for < lightning-input> in LWC (not Aura)?

all I want is change the border radius and color. I could have used slds input for styling then I have to write all kind of custom validation myself.

inputField.setCustomValidity("some custom validation error");

This simply works in lightning-input


1 Answer 1


You could also override the style using something like this

style="border:solid red; border-radius: 2%;"
  • When you inspect lightning-input you'll see there are parent elements to the input tag. Styling only gets applied to outer element
    – Arindam
    Jul 9, 2021 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.