0

I have a textarea field in my LWC. I'm trying to set height for the textarea but no luck.

<lightning-textarea name={record.id} class="slds-p-horizontal--xx-small" variant="label-hidden" onblur={updateValue} onchange={valueChange} value={value} disabled={isdisabled}></lightning-textarea>

When I tried to override slds-textarea class, instead of increasing the height of the content, it increase the entire area.

.slds-textarea {
    height: 250px;
    max-height: 250px;
}

I've given description for the images added here but not sure why its no visible. First image is the actual output and the second image is the expected output

Actual Output

Expected Output

2
  • use a regular HTML textfield?
    – glls
    Sep 15 '21 at 15:55
  • thanks alot glls. It worked !!
    – sfMon
    Sep 15 '21 at 16:48
0

You can use a regular HTML text area, since lightning components in the end render html elements that use web api's and leverage slds styling (amongst other things)

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.