Restrict Your Custom Lightning Components to Specific Objects

If you have a custom Lightning component bundle designed for use on Lightning pages, add the new <sfdc:object> tag set to the .design file to restrict the component only to certain objects.

Example

For example, here’s a design resource that goes in a bundle with a “Hello World” component.
<design:component label="Hello World">
    <design:attribute name="subject" label="Subject" description="Name of the person you want to greet" />
    <design:attribute name="greeting" label="Greeting" />
</design:component>
Here’s the same design resource restricted to two objects.
<design:component label="Hello World">
    <design:attribute name="subject" label="Subject" description="Name of the person you want to greet" />
    <design:attribute name="greeting" label="Greeting" />
    <sfdc:objects>
        <sfdc:object>Custom__c</sfdc:object>
        <sfdc:object>Opportunity</sfdc:object>
    </sfdc:objects>
</design:component>