[SalesForce] Set a Custom Label for App Builder Lightning Component
Is it possible to set a custom label for the name of a Lightning Component in the App Builder? In the example below, my component is named "DashboardPage" – can I change the label to something else, or do I have to rename the entire component?
Best Answer
Yes. You need to create a design file for the component:
<design:component label="Label For Component">
</design:component>
you're right that this isn't supported yet, and there's no public scheduled roadmap for this (2016-12-29). That said, the use case is clear and obviously useful to a lot of people.
Here's what I would do. I acknowledge that this is not the same as the nice interface you're looking for. Create a custom metadata type for your ComponentConfigGroup. Then, another custom metadata type for ComponentConfigItems with a metadata relationship to the group.
I'd define one "group" per page you want to use your component on, and it'd have n "items", which each define their content and the conditions. Then, in Lightning App Builder, you drag over one global component and type in the DevName of your group metadata record.
On the roadmap (I've heard pilot in summer, safe harbor) is some level of dynamic function added to the design/attributes pane in app builder, which might let you display all your groups for the user to select.
You might just need to refresh your App Builder interface. Normally, with what you have, it should be available under custom components on your left hand panel.
Best Answer
Yes. You need to create a design file for the component:
See the Add a Design Resource to Your Component Bundle section in the dev guide at https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_app_builder.htm