Supported aura:attribute Types

aura:attribute describes an attribute available on an app, interface, component, or event.
Attribute Name Type Description
access String Indicates whether the attribute can be used outside of its own namespace. Possible values are public (default), and global, and private.
name String Required. 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" />.
type String Required. The type of the attribute. For a list of basic types supported, see Basic Types.
default String The 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.
required Boolean Determines if the attribute is required. The default is false.
description String A summary of the attribute and its usage.

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

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

Note

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

See Also