As I was playing around with the Lightning Component's documentation I saw that in order to display an example, I need to provide a reference to an actual example, but I haven't figured any possible way to provide that example without creating another component for it.

On the other hand, if I create an example component, the Component Library will list it as an available component, which I don't want it to.

Have you guys come across this and tried to fix it?

This is how the .auradoc looks as of now:

            An <code>c:ReminderOpportunitiesTable</code> component displays a paginated and sortable table
            with all the opportunities which don't have automatic reminders.

            This example illustrates how to use the component.

&lt;aura:application description="RemindersDashboard" extends="force:slds"&gt;
      &lt;c:ReminderOpportunitiesTable /&gt;

    <aura:example name="ReminderOpportunitiesTable" ref="c:RemindersOpportunitiesTableExample" label="Using the c:ReminderOpportunitiesTable Component">
        <p>This example shows how to setup <code>ReminderOpportunitiesTable</code>.</p>

While my example component is as trivial as:

<aura:component description="RemindersOpportunitiesTableExample">
    <!-- Take into account that this component doesn't have parameters. It's just an embeddable table -->
    <c:ReminderOpportunitiesTable />
  • Do you have a namespace defined in the org you are working on? if so, do ref = "namespace:RemindersOpportunitiesTableExample"
    – Ranga
    Commented Aug 20, 2018 at 8:25
  • @Ranga I don't have any namespace, no. Commented Aug 20, 2018 at 8:34
  • 1
    sorry I think I miss understood what you wanted. I dont think we can hide example component from the library. It would be really nice if Salesforce allow it though. I'll upvote :)
    – Ranga
    Commented Aug 20, 2018 at 8:38


You must log in to answer this question.

Browse other questions tagged .