Supported aura:attribute Types

aura:attribute describes an attribute available on an app, interface, component, or event.

Attribute NameTypeDescription
accessStringIndicates whether the attribute can be used outside of its own namespace. Possible values are public (default), and global, and private.
nameStringRequired. The name of the attribute. For example, if you set <aura:attribute name="isTrue" type="Boolean" /> on a component called aura:newCmp, you can set this attribute when you instantiate the component; for example,<aura:newCmp isTrue="false" />.
typeStringRequired. The type of the attribute. For a list of basic types supported, see Basic Types.
defaultStringThe default value for the attribute, which can be overwritten as needed. When setting a default value, expressions using the $Label, $Locale, and $Browser global value providers are supported. Alternatively, to set a dynamic default, use an init event. See Invoking Actions on Component Initialization.
requiredBooleanDetermines if the attribute is required. The default is false.
descriptionStringA summary of the attribute and its usage.

All <aura:attribute> tags have name and type values. For example:

1<aura:attribute name="whom" type="String" />

Although type values are case insensitive, case sensitivity should be respected as your markup interacts with JavaScript, CSS, and Apex.

Note

See Also