An object that supports styling and may have variants.

Available since

1.0.0

.

Variables

read onlystyleContext:Class<IStyleObject>

The class used as the context for styling the UI component. In other words, a subclass of a component may have different styles than its superclass, or it may inherit styles from its superclass.

Available since

1.0.0

.

variant:String

May be used to provide multiple different variations of the same UI component, each with a different appearance, but instantiated with the same class.

The following example sets the variant of a Label component:

var label = new Label();
label.variant = Label.VARIANT_HEADING;
Available since

1.0.0

.