Newer Version Available

This content describes an older version of this product. View Latest

Abstract Components

Object-oriented languages, such as Java, support the concept of an abstract class that provides a partial implementation for an object but leaves the remaining implementation to concrete sub-classes. An abstract class in Java can't be instantiated directly, but a non-abstract subclass can.

Similarly, the Lightning Component framework supports the concept of abstract components that have a partial implementation but leave the remaining implementation to concrete sub-components.

To use an abstract component, you must either extend it and fill out the remaining implementation, or add a provider. An abstract component can't be used directly in markup unless you define a provider.

The <aura:component> tag has a boolean abstract attribute. Set abstract="true" to make the component abstract.