Skip to main content

Configuration File Tags: targetConfigs

Configure the component for different page types and define component properties.
For example, a component could have different properties on a record home page than on the Salesforce Home page or on an app page.
For Communities, only lightningCommunity__Default supports component properties.

Supports the targetConfig subtag:

Use a separate targetConfig for each different page type configuration. Specify one or more page types in the targets attribute, such as
 <targetConfig targets="lightning__RecordPage"> or 
<targetConfig targets="lightning__RecordPage,lightning__AppPage">

The targets attribute value that you specify must match one or more of the page types that you listed under <targets> for the component.
Supports the property, objects, and supportedFormFactors subtags.

Specifies a public property of a component that can be set in Lightning App Builder, App Manager, Lightning Flow Builder, or Community Builder. The component author defines the property in the component’s JavaScript class using the @api decorator.

The property tag supports these attributes:

Syntax: <property name="backgroundColor" type="Color" default="rgba(0, 255, 255, 1)">

Renders a field as a picklist, with static values. Supported only if the type attribute is String.
Syntax: <property name="Name" datasource="value1,value2,value3" />
You can also set the picklist values dynamically using an Apex class.
<property name="Name" datasource="apex://MyCustomPickList"/>
See Create Dynamic Picklists for Your Custom Components for more information.

The default value for the attribute.

Displays as an i-bubble for the attribute in the tool.

Displays as a label for the attribute in the tool.

The maximum allowed value for an attribute of type Integer. Not supported if the target is lightning__FlowScreen.

The minimum allowed value for an attribute of type Integer. Not supported if the target is lightning__FlowScreen.

Required if you’re setting properties for your component. The attribute name. This value must match the property name in the component’s JavaScript class.

Input placeholder text for the attribute when it displays in the tool. 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.

Specifies whether the attribute is required. The default value is false.

Specifies whether the attribute is inputOnly or outputOnly. If you don’t specify the role attribute, the default value allows input and output. For example, if a property is restricted to outputOnly, users can’t set its value from a Lightning record page. Supported only if the target is lightning__FlowScreen.

The attribute’s data type.
To specify a list, add array notation [] to the end of any data type.
These values are valid for all targets:
These values are valid only if the target is lightning__FlowScreen:
apex://namespace.Classname—An Apex class used for an Apex-defined data type.
Date—A date in ISO 8601 format.
DateTime—A datetime in ISO 8601 format.
@salesforce/schema/namespace__Objectname or @salesforce/schema/Objectname—An object.

Classname—The name of the Apex class.
namespace—The namespace of the Salesforce organization. Specify a namespace unless the organization uses the default namespace (c), in which case don’t specify it.
Objectname—The name of the object.



A set of one or more objects the component is supported for. This tag set works only inside a parent targetConfig that’s configured for lightning__RecordPage. Specify the objects tag set only once inside a targetConfig set. Supports the object subtag.
Defines which objects the component is supported for. Use one object tag for each supported object. You can’t use ‘*’ to denote all objects.
See the User Interface API Developer Guide for the list of supported objects.


A set of one or more form factors or devices that the component supports. Specify the supportedFormFactors tag set once inside a targetConfig set. Supports the supportedFormFactor subtag.
Defines which form factor or device the component supports. Use one supportedFormFactor tag for each supported form factor.
The supportedFormFactor tag supports these attributes:
Device form factor on which the component displays. Valid values are:
Large—Represents the desktop form factor. Supported for all page types.
Small—Represents the phone form factor. Supported for lightning__AppPage only.


Popular posts from this blog

Platform Developer I Certification Maintenance (Winter '23)

 Maintain Your Platform Developer I Certification for Winter ’23 1. Field update actions have changed in API Version 54.0. Which record-triggered flows do field update actions now execute? Answer: Before-Save after After-Save 2. Which Apex class is used to determine the hostnames for the domains that Salesforce hosts for your org? Answer: System.DomainCreator 3. Which modules can be used for notifications in a Lightning web component instead of native APIs? Answer: LightningAlert, LightningConfirm, and LightningPrompt 4. What determines an org’s “shape” in Salesforce? Answer: Features, settings, edition, limits, and licenses 5. Which lightning-modal-* component is required to create a modal? Answer: Body 6. How do you call an invocable action from Apex code? Answer: Reference Invocable.Action Get Hands-On With Apex Assertions 1. Create Two Apex class: Copy and Paste below codes (A.) TestFactory @isTest public class TestFactory {    public static Account getAccount(String accountName, B

Administrator Certification Maintenance (Spring '23)

 Maintain Your Administrator Certification for Spring '23 1. What information is listed in the Details panel for recently used reports? Answer: A, B, C 2. What is used to give sales reps access to a guided process to import contacts and leads? Answer:  Sample CSV file 3. Which feature efficiently removes inactive picklist values? Answer: Bulk Delete Unused Values 4. Which type of Process Builder processes can be converted using the Migrate to Flow tool? Answer: Record-triggered Get Hands-on with Enhance Record Pages With Dynamic Forms Follow steps show in Screenshot also highlighted with Red Box:

Custom Table In LWC

I'm assuming you've Basic understanding of Lightning Web Component, I'll be explaining you the syntax that will be generic. HTML: < template > <!-- Header Part -->      < lightning-card   title = "Custom Data table in Lightning Web Components" >          < div   class = "slds-grid slds-gutters" >              < div   class = "slds-col" >                  < span ></ span >              </ div >              < div   class = "slds-col" >                  < span > <!--A Button For extra feature-->                      < lightning-button   label = "Show Selected Contacts"   onclick = {showContacts}   style = "margin-left: 40%"   variant = "brand" > </ lightning-button >                  </ span >              </ div >          </ div >< br />