---
schema_version: "1"
id: 0cfae3116532f8a1f4c0c6ef126df23cb16ccf4de5b2ffbc6763106fcdba0fff
title: Override an Omniscript Element with a Custom Lightning Web Component
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_standard_override_an_omniscript_element.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_standard_override_an_omniscript_element.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 94548fc21c23354d277952d36b067edde6eb51cdf8848b720ac802cf3e110445
description: Override an Omniscript element with custom Lightning web components (LWCs) to add custom behavior and styling to the Omniscript element.
products:
  - Omnistudio
release: "264"
---
# Override an Omniscript Element with a Custom Lightning Web Component

Override an Omniscript element with custom Lightning web components (LWCs) to add custom behavior and styling to the Omniscript element.

Before You Begin

- Ensure your custom LWC is deployed with `<isExposed>true</isExposed>` in its `.xml` file.
- Review the base Omniscript LWC in the `omni-base-templates` folder to identify the correct component to extend.

To override an Omniscript element:

1. From the elements panel, drag an element that you want to override to the Omniscript canvas.
    
    For example, drag a Text element.
2. In the Properties panel, enter the name of your custom component in **LWC Component Override**.
    
    For example, enter the name **customText**.
3. In the Setup panel, click **Edit Properties As JSON** and add this property: `“useCustomLMS”: true`.
    
    This allows your custom components to communicate with the Omniscript standard runtime components.
4. To close the property editor, click **Close the JSON Editor.**
5. Save and activate the Omniscript.
6. To preview the Omniscript, click **Preview**.

Points to consider:

- Your custom LWC should extend the correct base Omniscript component. For example, `OmniscriptDate`.
- Override specific methods in the parent component as needed. For example, `setElementFormattedValue()`.
- After overriding, test the Omniscript in **Preview** mode to verify styling and behavior changes.