lightningStatic__Email
Target
Enables a component to be used in Email Content Builder.
Configures the component for Email Content Builder and defines component properties. The targetConfigs
tag contains at least one targetConfig
tag.
Configures a page type with this attribute.
Attribute | Description | Required |
---|---|---|
targets | Specify one or more page types in the targets attribute, such as <targetConfig targets="lightningStatic__Email"> or <targetConfig targets="lightningStatic__Email,lightning__AppPage"> . The targets attribute value must match one or more of the page types that you listed under <targets> . | Yes |
The targetConfig
tag includes at least one property
tag.
Specifies a public property of a component that can be set in Email Content Builder. The component author defines the property in the component’s JavaScript class using the @api
decorator. See the Usage section.
Use the property
tag with these attributes.
Attribute | Type | Description | Required |
---|---|---|---|
name | String | The attribute name. This value must match the property name in the component’s JavaScript class. | Yes |
type | String | The attribute's data type. The following values are valid for all targets. Make sure that this value matches the type assigned to the property in the component's JavaScript module. If the types don't match, the value in the configuration file takes precedence.
| Yes |
datasource | String | Renders a field as a picklist, with static values. Supported only if the type attribute is String . For example: datasource="value1,value2,value3" . You can also set the picklist values dynamically using an Apex class, such as: datasource="apex://MyCustomPickList" . For more information, see Create Dynamic Picklists for Your Custom Components. | |
default | String | The default value for the attribute. | |
description | String | Displays as an i-bubble for the attribute in Email Content Builder. | |
label | String | Displays as a label for the attribute in Email Content Builder. | |
max | Integer | The maximum allowed value for an attribute of type Integer . | |
min | Integer | The minimum allowed value for an attribute of type Integer . | |
placeholder | String | Input placeholder text for the attribute when it displays in Email Content Builder. This text is the ghost text in text fields and text areas before a user starts typing. Supported only if the type attribute is String . | |
required | Boolean | Specifies whether the attribute is required. The default value is false . |
To expose a component property in Email Content Builder, define the property in the component’s JavaScript class using the @api
decorator.
Bind the paddingTop
property in your template.
The component renders with a style
value that a user provides in the Property Editor.
See Also
- Configure a Component for the Email Builder
- Add Custom HTML To a Component
- XML Configuration File Elements
- Salesforce Help: Use Custom Components in Email
- Salesforce Developers Blog: Extend Email Templates with Lightning Web Components