You need to sign in to do that
Don't have an account?
Lightning Web Component Styling - Textarea
Hello,
I am facing this issue in many out of the box LWC components. I am trying to change the style of text area by defining a css class. But it is failing to override the slds style at run time? Any idea?
You can find this live at : https://developer.salesforce.com/docs/component-library/tools/playground/QWa-zfwxW/1/edit
I am facing this issue in many out of the box LWC components. I am trying to change the style of text area by defining a css class. But it is failing to override the slds style at run time? Any idea?
<template> <div class="row slds-m-vertical_large"> <h2 class="header">Basic Examples</h2> <lightning-textarea name="input1" label="Enter some text" class="mytextarea"> </lightning-textarea> </div> </template> .mytextarea{ height: 150px; }
You can find this live at : https://developer.salesforce.com/docs/component-library/tools/playground/QWa-zfwxW/1/edit
All Answers
Greetings to you!
- 'mytextarea' class is for the label Enter Some Text, so when you add a CSS to that class the Enter Some Text area part will be changed.
Please use the below link for further reference : -
- https://success.salesforce.com/answers?id=9063A000000plnTQAQ
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.