A mixin is a class that exists solely to provide properties and functions to other classes. Using mixins, you can simulate inheritance between classes.
For example, I might have different classes for various elements, such as buttons, menus, datePickers, and dropdowns. Each of these elements are clickable. Instead of defining similar functions for each of them, I can "mix" the
ClickableMixininto each each of these classes. Each class then has access to the same functionality.
Velo comes with several mixins that many of its APIs use. Velo mixins are Wix Editor Elements (
This article describes and links to each mixin in the Velo Reference.
When looking at the Velo Reference, mixin functions and properties are described along with any functions and properties that are unique to the class. This gives you a complete list of any functions and properties you can use with the API, regardless of their source.
After an API's summary of functions and properties, before its Introduction, referenced mixins are listed.
Click one of the links to see which functions and properties come from a mixin and not the current API you are viewing.
Note: Mixins can comprise other mixins. For example, the
HiddenCollapsedMixinis a superset of the
The table below presents each mixin. Click its link to see its functions and properties.
|CheckedMixin||Provides functionality for elements that can be be checked.|
|ClickableMixin||Provides functionality for elements that can be clicked.|
|CollapsedMixin||Provides functionality for elements that can be collapsed.|
|ContainableMixin||Provides functionality for elements that can contain other elements.|
|DisabledMixin||Provides functionality for elements that can be disabled.|
|Element||Provides basic functionality for elements.|
|Event||Provides properties for events that are fired when certain actions occur to elements.|
|FocusMixin||Provides functionality for elements that can set and lose focus.|
|FormElement||Provides functionality related to user input elements.|
|HiddenCollapsedMixin||Provides functionality for all elements that can be hidden or collapsed.|
|HiddenMixin||Provides functionality for elements that can be hidden.|
|LabelMixin||Provides functionality for elements that have a label.|
|LinkableMixin||Provides functionality for elements that can act as links.|
|Node||Provides functionality for all Wix objects, including objects that are not elements.|
|PlayableMixin||Provides functionality for elements that can be played.|
|ReadOnlyMixin||Provides functionality for input elements that support readonly mode.|
|RequiredMixin||Provides functionality for input elements that can be required to have a value.|
|Style||Provides an object representing an element's styles.|
|StyleMixin||Provides functionality for elements that can be styled.|
|TextInputMixin||Provides functionality for elements that accept text as input.|
|ValidatableMixin||Provides functionality for elements that can be validated.|
|ValueMixin||Adds the value property to elements.|
|ViewportMixin||Provides functionality for elements that can be scrolled into and out of view.|
Was this helpful?