Documentation helps developers use your components to develop their apps more effectively. You can provide interactive examples, documentation, and specification descriptions for a component, event, or interface.
Each component, event, or interface has a root definition that defines the element’s metadata, as well as attributes, events, or methods.
Component
A component’s root definition is specified in the <aura:component> tag contained in componentName.cmp, as described in Component Markup.
Event
An event’s root definition is specified in the <aura:event> tag contained in componentEvent.evt, as described in Create Custom Component Events.
Interface
An interface’s root definition is specified in the <aura:interface> tag contained in the interfaceName.intf, as described in Interfaces.
The root definition tag determines whether the element is exposed in the Component Library. You provide the documentation for each element in an .auradoc file that accompanies the other files that define the component, event, or interface.
For namespaces that you own, elements with either access="global" or access="public"(default) are surfaced in the Component Library when it’s accessed through your org.
In the unauthenticated Component Library, only the elements with access="global" are visible.
For managed package namespaces, only elements with access="global" are surfaced in the Component Library. Elements with access="public" can be used only by components in the same namespace in the same org. They aren’t available to other orgs that install the package, so they aren’t surfaced in the Component Library. Only global components in managed packages are visible because they are intended for use in any namespace in any org.
Each element can display up to three tabs in the following order.
Example
Displays interactive examples denoted by the <aura:example> tag in the .auradoc file. This tab is hidden if no examples are wired up in your .auradoc file. This tab is not supported if your component has dependency on org data, such as with lightning:recordForm.
Documentation
Displays the content of the .auradoc file. This tab is hidden if an .auradoc file is not available for your component, event, or interface.
Specification
Displays the description of the root definition, attributes, and methods. For namespaces you own, attributes and methods with either access="global" or access="public"(default) are surfaced in the Component Library when it’s accessed through your org. For managed package namespaces, only access="global" attributes and methods are visible.