What Is a Mixin?
A 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 ($w).This article describes and links to each mixin in the Velo Reference.
Which Functions and Properties Are From Mixins?
When looking at the , 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. For example:
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
HiddenCollapsedMixin
is a superset of the HiddenMixin and the
CollapsedMixin
.
Velo Mixins
The table below presents each mixin. Click its link to see its functions and properties in the Velo Reference.
- : Provides functionality for elements that can be be checked.
- : Provides functionality for elements that can be clicked.
- : Provides functionality for elements that can be collapsed.
- : Provides functionality for elements that can contain other elements.
- : Provides functionality for elements that can be disabled.
- : Provides basic functionality for elements.
- : Provides properties for events that are fired when certain actions occur to elements.
- : Provides functionality for elements that can set and lose focus.
- : Provides functionality related to user input elements.
- : Provides functionality for all elements that can be hidden or collapsed.
- : Provides functionality for elements that can be hidden.
- : Provides functionality for elements that have a label.
- : Provides functionality for elements that can act as links.
- : Provides functionality for all Wix objects, including objects that are not .
- : Provides functionality for elements that can be played.
- : Provides functionality for input elements that support readonly mode.
- : Provides functionality for input elements that can be required to have a value.
- : Provides an object representing an element's styles.
- : Provides functionality for elements that can be styled.
- : Provides functionality for elements that accept text as input.
- : Provides functionality for elements that can be validated.
- : Adds the value property to elements.
- : Provides functionality for elements that can be scrolled into and out of view.
Previously published at