CustomTab defines a navigation entry that displays custom object data, a Lightning component or page, a Visualforce page, an s-control, or external web content. When added to an app, it appears as a tab in Salesforce Classic and as an app navigation item and App Launcher entry in Lightning Experience.
The tab definition, its placement in an app, and its visibility settings are separate configurations. Deploying a CustomTab does not by itself add the tab to an app or reproduce the tab settings held in profiles and permission sets.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The component's metadata identity. For an object tab, it must match the object's developer-assigned name, such as MyCustomObject__c, including any namespace and suffix. Web, Visualforce, and s-control tabs have independently assigned names. |
customObject |
Set to true for an object tab. The component name identifies the object; there is no separate object-reference element. |
auraComponent, lwcComponent
|
The Aura component or Lightning web component to display. These are alternative content selectors, not settings to combine on one tab. |
flexiPage |
The Lightning page to display, identified by its FlexiPage name. |
page, scontrol
|
The Visualforce page or s-control to display. A Visualforce page uses the metadata type ApexPage. Both tab kinds require frameHeight. |
url |
The external web page to embed in the tab. |
actionOverrides |
Overrides assigned to the tab. Only one override is allowed for each formFactor on a given tab. |
actionOverrides.content, actionOverrides.type
|
The override implementation and its kind. Documented type values are default, flexipage, lightningcomponent, scontrol, standard, and visualforce. The nested content field identifies the implementation for a content-based override. |
actionOverrides.formFactor |
Large identifies Lightning Experience desktop; Small identifies the Salesforce mobile app. Omitting the value identifies Salesforce Classic. Medium is reserved for future use. |
motif |
Required tab style, controlling the color scheme and icon style. Standard values include Custom53:Bell and Custom70:Handsaw. |
icon |
An optional reference to a Document containing a custom image, rather than a standard tab-style icon. The image is a separate asset, not embedded in the tab definition. |
frameHeight |
The tab frame height in pixels. Required for Visualforce page and s-control tabs. |
label |
The displayed label, documented for web tabs only. It is not a general mechanism for renaming object tabs. |
splashPageLink |
The custom link used as an introductory splash page when a user clicks the tab. |
urlEncodingKey |
The character encoding for information passed to a URL tab, defaulting to UTF-8. Exposed values are Big5, Big5-HKSCS, EUC-JP, GB2312, ISO-2022-JP, ISO-8859-1, ks_c_5601-1987, Shift_JIS, UTF-8, and x-SJIS_0213. This is not the metadata file's encoding. |
Behavior and Constraints
Select one content kind. The top-level selectors auraComponent, customObject, flexiPage, lwcComponent, page, scontrol, and url are mutually exclusive. Only one can have a value set.
Object tabs use object identity. When customObject=true, the entire tab component name identifies the associated object. Preserve its namespace and object suffix. A non-object tab does not become associated with an object merely because their names happen to match. The displayed label is not the component's deployment identity.
Overrides are separate from displayed content. An override's content is nested inside actionOverrides; it is not another top-level content selector. It can identify a Visualforce page, Lightning page, Aura component, or s-control. For installed components, the documented reference format is Component_namespace__Component_name.
The override types default and standard are not equivalent. default uses an installed package's custom override when one is available, otherwise falling back to Salesforce behavior. standard explicitly selects regular Salesforce behavior.
Component eligibility is configured on the component. Naming a component in CustomTab is not the whole configuration. For Lightning web component tabs, community guidance specifies isExposed=true and a lightning__Tab target in the component configuration. For Aura tabs, reported validation requires force:appHostable, the interface that makes an Aura component available for tab hosting, and no required attributes without default values. These settings belong to the referenced component, not the tab.
Presentation settings have different scopes. motif remains required; icon separately references a custom image. hasSidebar controls whether the tab displays the sidebar panel. For URL tabs, change urlEncodingKey only to match the encoding expected by the destination URL.
Deployment and Retrieval
In Metadata API package format, each tab has one .tab file in the tabs folder. CustomTab supports the * wildcard in package.xml.
Retrieve a specific tab by its component API name, not its label or filename. For example, the metadata selector CustomTab:Commerce_Buffer__c identifies an object tab. Do not append .tab-meta.xml to that selector. A non-object tab uses its independently assigned component name.
Retrieval scope changes visibility output. Retrieving a CustomTab causes that tab to appear in any Profile and PermissionSet components retrieved in the same package. A comparison between retrievals with different tab scopes can therefore show different profile or permission-set content. Retrieving only the tab does not retrieve app placement or all of its visibility configuration.
App placement resides in referencing configuration such as CustomApplication. Tab settings reside in profiles and permission sets. These relationships identify configuration outside the tab definition; they do not prove actual app usage, user assignments, or a mandatory deployment sequence.
For a custom icon, the referenced image must be available as a separate asset. A reported second-generation managed package example included the image file, its Document metadata, and its DocumentFolder metadata, with an icon reference such as DocumentFolder/Something.png. Missing images can also produce a misleading deployment error, as described under Reported Issues.
Relationships
The outgoing references select displayed content, override implementations, and supporting presentation assets. Incoming references control navigation, visibility, prompts, and translations. The content references below belong inside actionOverrides.
Name-based association: CustomObject is associated through the entire tab component name only when customObject=true. This is not an XML reference element and does not by itself establish a deployment order or authorize deletion of either component.
References
-
ApexPage:page,content. -
CustomPageWebLink:splashPageLink. -
Document:icon. -
FlexiPage:flexiPage,content. -
HomePageComponent:splashPageLink, the documented splash-page target. -
LightningBundle:auraComponent,content. -
LightningWebComponent:lwcComponent. -
Scontrol:scontrol,content,splashPageLink.
Referenced By
-
AppMenu:name. -
CustomApplication:defaultLandingTab,tabs,tab,subscriberTabs,pageOrSobjectType. -
MutingPermissionSet:tab. -
Network:customTab,defaultTab,standardTab. -
PermissionSet:tab. -
Profile:tabwithintabVisibilities. -
Prompt:targetPageKey1,targetPageKey2,targetPageKey3,targetPageKey4. -
Translations:name.
Documentation Inconsistencies
Override type capitalization differs. Salesforce documents default, flexipage, lightningcomponent, scontrol, standard, and visualforce. An exposed schema enumeration instead uses Default, Flexipage, LightningComponent, Scontrol, Standard, and Visualforce. Do not assume these spellings are interchangeable.
The general naming text conflicts with the object-tab example. The fullName description prohibits consecutive underscores, but the same definition requires object tabs to match object names such as MyCustomObject__c. For an object tab, retain the exact object name, including its suffix and any namespace.
Reported Issues
-
A missing icon image can look like a length violation. In a sandbox deployment case resolved in 2017, tabs with custom icons failed with
Value too long for field: Icon maximum length is:15. The referenced image was missing from Shared Documents; uploading it resolved the failure. This report does not establish a 15-character limit for folder-qualified icon references. Missing-image deployment report. -
Custom images have been reported to work in second-generation managed packages. A 2025 object-tab example used
DocumentFolder/Something.pngand included the image,Documentmetadata, andDocumentFoldermetadata. It used a public document in a public, read-only folder. Those access settings describe that example, not a universal requirement for packaged icons. Packaged custom-icon example. -
An LWC tab requires configuration beyond the tab reference. Community guidance in 2023 specified
isExposed=trueand thelightning__Tabtarget in the component configuration. The tab then references the component throughlwcComponent. LWC tab configuration discussion. -
Aura eligibility validation can fail even when the hosting interface is present. In a 2017 report, validation required
force:appHostableand no required attributes without defaults. The component already implemented the interface. Replacing an attribute type that referenced an Apex inner class resolved that case; it does not establish a general prohibition on inner-class use. Aura tab validation report. -
Using a filename as the retrieval member can return no results. In a 2020 report, the selector included
Commerce_Buffer__c.tab-meta.xml. The accepted correction used onlyCustomTab:Commerce_Buffer__c, the component API name rather than the label or filename. Tab retrieval naming discussion.
Common Questions
How do I retrieve a custom tab by API name?
Use CustomTab with the tab's component API name, such as CustomTab:Commerce_Buffer__c. Do not use the displayed label or append a metadata file extension. In a manifest, CustomTab also supports *.
Why did deploying my custom tab not add it to the app or make it visible?
The tab definition does not contain all of that configuration. App placement is held in referencing configuration such as CustomApplication, while profiles and permission sets hold tab settings. Retrieving the tab alongside those access components affects which tab settings appear in their retrieved files.
Can I use a custom image for a tab in a managed package?
A second-generation managed package example reported success for an object tab. It referenced the image through icon and included the image, its Document metadata, and its DocumentFolder metadata. The tab does not contain the image itself.
Why is my Lightning component unavailable for a custom tab?
Check the component's tab eligibility, not just the tab reference. Reported LWC guidance uses isExposed=true and lightning__Tab. Reported Aura validation requires force:appHostable and no required attributes without default values; one failure also involved an attribute typed to an Apex inner class.
Does changing label rename an object tab's metadata identity?
No. An object tab's component name must match the object's developer-assigned name when customObject=true. label is documented for web tabs only and is not a general object-tab renaming mechanism.