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
    Commented Sep 15, 2021 at 15:55
  • thanks alot glls. It worked !!
    – sfMon
    Commented Sep 15, 2021 at 16:48

1 Answer 1

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)

You must log in to answer this question.

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