Create Lightning Web Component
sf_create_lwcCreate and deploy a Lightning Web Component (LWC) to Salesforce, including HTML, JavaScript, CSS, and metadata. Specify targets for App Builder, Flow, Utility Bar, or Experience Cloud.
Instructions
Creates and deploys a new Lightning Web Component (LWC) to the Salesforce org. Provide the HTML template, JavaScript controller, optional CSS, and component metadata. The component is packaged into a deployment zip and deployed via the Metadata API. Specify targets to make the component available in Lightning App Builder (AppPage, RecordPage, HomePage), Flow Screen, Utility Bar, or Experience Cloud. Use isExposed:true to make it drag-and-drop in App Builder.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | Optional CSS styles content | |
| html | Yes | HTML template content (the content of the .html file, including <template> tags) | |
| targets | No | Where this component can be placed in Lightning | |
| isExposed | No | Make the component available in Lightning App Builder | |
| apiVersion | No | API version for this component | 66.0 |
| javascript | Yes | JavaScript controller content (the content of the .js file, including import statements and class) | |
| description | No | Description of the component | |
| componentName | Yes | LWC component name in camelCase, e.g. 'accountCard', 'opportunityList' |