---
schema_version: "1"
id: 3dc7ff61f576bcacbf6942609bd3d2b902a2e7ccaacadaab1a268d530654e445
title: AuraDefinitionBundle
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_auradefinitionbundle.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_auradefinitionbundle.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 84b595475bb2c0fb2dc832ef305e6f56763106c6a79ae86e26db2527557da8ea
description: Represents an Aura definition bundle. A bundle contains an Aura definition, such as an Aura component, and its related resources, such as a JavaScript controller. The definition can be a component, application, event, interface, or a tokens collection.
---
# AuraDefinitionBundle

Represents an Aura definition bundle. A bundle contains an Aura definition, such as an Aura component, and its related resources, such as a JavaScript controller. The definition can be a component, application, event, interface, or a tokens collection.

## File Suffix and Directory Location

An AuraDefinitionBundle component is a folder that contains definition files. Unlike most other metadata components, an AuraDefinitionBundle component isn’t a single file, it’s a collection of files. Each file represents a resource in a bundle, such as markup, applications, code files (including controllers and helpers), events, documentation, and interfaces. For example, this directory structure shows the hierarchy of the folders and files for two bundles: bundle1 and bundle2.

aura
    bundle1
        bundle1.cmp
        bundle1Controller.js
    bundle2
        bundle2.app
        bundle2Controller.js
        bundle2.auradoc

Aura definition bundles must be under a top-level folder named aura. Each bundle must have its own subfolder under the aura folder. The name of each definition file must start with the bundle name.

A bundle doesn’t have a suffix. Definition files can have one of these suffixes:

| Suffix | Component Type |
| --- | --- |
| .app | Application |
| .cmp | Component |
| .design | Design |
| .evt | Event |
| .intf | Interface |
| .js | Controller, Helper, or Renderer |
| .svg | SVG image |
| .css | Style |
| .auradoc | Documentation |
| .tokens | Tokens collection |

Each bundle can have only one file each with a suffix of .app, .cmp, .design, .evt, .intf, or .tokens.

## Version

AuraDefinitionBundle components are available in API version 32.0 and later.

Design and SVG components are available in API version 33.0 and later.

In API version 45.0 and later, there are two types of Lightning component: Aura components and Lightning web components. This metadata type describes an Aura component.

## Special Access Rules

Definitions can be created only in organizations with defined namespaces.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d160819e261">Field Name</th>

              <th class="featureTableHeader  " id="d160819e264">Field Type</th>

              <th class="featureTableHeader  " id="d160819e267">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="ph" id="apiVersion"><a name="apiVersion"><!-- --></a><span class="keyword parmname">apiVersion</span></span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">double</td>

              <td class="entry" headers="d160819e267" data-title="Description">
                <span class="ph" id="apiVersionDesc"><a name="apiVersionDesc"><!-- --></a>The API version for this definition bundle. When you
                  create an Aura bundle, you can specify the API version to save it with.</span>
                Available in API version 35.0 and later.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="keyword parmname">auraDefinitions</span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">AuraDefinitions</td>

              <td class="entry" headers="d160819e267" data-title="Description">Reserved for internal use.</td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="keyword parmname">controllerContent</span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">base64Binary</td>

              <td class="entry" headers="d160819e267" data-title="Description">The content of a JavaScript client-side controller.</td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="ph" id="description"><a name="description"><!-- --></a><span class="keyword parmname">description</span></span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">string</td>

              <td class="entry" headers="d160819e267" data-title="Description">
                <span class="ph" id="descDesc"><a name="descDesc"><!-- --></a>The specification of the Aura bundle.</span> Available in API
                version 35.0 and later.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="keyword parmname">designContent</span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">base64Binary</td>

              <td class="entry" headers="d160819e267" data-title="Description">The content of a design definition. Only valid inside a component
                bundle.</td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="keyword parmname">documentationContent</span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">base64Binary</td>

              <td class="entry" headers="d160819e267" data-title="Description">The content of a documentation definition.</td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="keyword parmname">helperContent</span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">base64Binary</td>

              <td class="entry" headers="d160819e267" data-title="Description">The content of a JavaScript helper.</td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="ph" id="markup"><a name="markup"><!-- --></a><span class="keyword parmname">markup</span></span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">base64Binary</td>

              <td class="entry" headers="d160819e267" data-title="Description">The content of the markup for a definition.</td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="keyword parmname">modelContent</span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">base64Binary</td>

              <td class="entry" headers="d160819e267" data-title="Description">Deprecated. Do not use.</td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="ph" id="packageVersions"><a name="packageVersions"><!-- --></a><span class="keyword parmname">packageVersions</span></span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_classes.htm#PackageVersion">PackageVersion</a>[]
              </td>

              <td class="entry" headers="d160819e267" data-title="Description">
                <span class="ph" id="packageVersionDesc"><a name="packageVersionDesc"><!-- --></a>The list of installed managed package versions that
                  this Aura definition bundle references.</span> Available in API version 35.0 and
                later.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="keyword parmname">rendererContent</span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">base64Binary</td>

              <td class="entry" headers="d160819e267" data-title="Description">The content of a JavaScript client-side renderer.</td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="keyword parmname">styleContent</span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">base64Binary</td>

              <td class="entry" headers="d160819e267" data-title="Description">The CSS for the definition.</td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="keyword parmname">SVGContent</span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">base64Binary</td>

              <td class="entry" headers="d160819e267" data-title="Description">The SVG image for the definition.</td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="keyword parmname">testsuiteContent</span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">base64Binary</td>

              <td class="entry" headers="d160819e267" data-title="Description">Reserved for internal use.</td>

            </tr>

            <tr>
              <td class="entry" headers="d160819e261" data-title="Field Name"><span class="ph" id="type"><a name="type"><!-- --></a><span class="keyword parmname">type</span></span></td>

              <td class="entry" headers="d160819e264" data-title="Field Type">AuraBundleType (enumeration of type string)</td>

              <td class="entry" headers="d160819e267" data-title="Description">The definition type. Valid values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Application</samp></li>

                  <li class="li"><samp class="codeph nolang">Component</samp></li>

                  <li class="li"><samp class="codeph nolang">Event</samp></li>

                  <li class="li"><samp class="codeph nolang">Interface</samp></li>

                  <li class="li"><samp class="codeph nolang">Tokens</samp></li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

This example shows the directory structure of an AuraDefinitionBundle component.

aura
    sampleCmp
        sampleCmp.cmp
        sampleCmpController.js

The following samples show the contents of the metadata definition files that correspond to the sample aura directory.

Content of sampleCmp.cmp:

<aura:component\>
    <aura:attribute name="val1" type="String" default="Value"/>
    <aura:attribute name="val2" type="String" />
    <aura:handler name="init" value="{!this}" action="{!c.myAction}"/>
        <ui:outputText value='Hello world!'/>
        <ui:outputText value='{!v.val1}'/>
        <ui:outputText value='{!v.val2}'/>
</aura:component\>

Content of sampleCmpController.js:

({  
  myAction : function(component) {
    component.set('v.val1','Value1');
    component.set('v.val2','Value2');
  }
})

This package.xml references the definitions of all Lightning components that are present in the sampleCmp bundle.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>sampleCmp</members\>
        <name\>AuraDefinitionBundle</name\>
    </types\>
    <version\>68.0</version\>
</Package\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).