I have a Lightning component with a form. This form has some fields as Read Only and some others editable. I use Lightning input with the property readonly. The issue is that on the ones that are readonly = "true", i want to keep having the "border", just as in non-read only. Is there a way to achieve that? For example in the below picture, i would like the value of DOY Code (1101) to be within a field "border" just like the field above.

enter image description here

1 Answer 1


The way to do that would be to use the disabled attribute. However, this will have other side effects, such as graying out the box and displaying the 🚫 mouse cursor.

<lightning-input label="Demo" value={displayValue} disabled></lightning-input>


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .