High-Level Guide to Creating Custom Property Types and Editors
After you decide which data validations and property editors you want for the properties in your custom component, it’s time to start building. This step-by-step summary outlines the process.
Creating a custom property type requires you to create a new metadata type, LightningTypeBundle, and a new Lightning web component for each custom property editor. These are the custom elements required for the Custom Article component example.
articleDate requires a standard Lightning type
textAlignment requires a custom property editor
layoutProperties requires a custom property type and a custom property editor
These steps summarize how to build the custom component. To follow along, download the sample components.
Reference a Lightning Type
Refer to the list of Lightning property types. (See Lightning Types Reference in the Lightning Types Developer Guide)
In the editor.json file, reference the custom property editor in the componentOverrides object and specify the layout of the properties in the layout object.
To show the custom property type in the Custom Article component, reference it by type attribute in the component’s js-meta.xml file.