Context Reference

The context section of a context provider manifest declares the values and functions that the provider exposes through editor binding. It contains an items map where each key names an exposed item.

Example

The following context exposes a value and a function:

Copy

Context item fields

A context item supports the following fields:

FieldRequiredDescription
dataTypeYesType of value or function that the item exposes.
displayNameNoItem name shown in the editor. Maximum 100 characters.
descriptionNoWhat the item holds or does. Maximum 300 characters.
arrayItemsWhen dataType is arrayItemsDefinition for each element in an array.
dataWhen dataType is dataFields in a nested object.
functionWhen dataType is functionParameters and return type of a function.
textEnumWhen dataType is textEnumAllowed string options.

Context items can't use the schema or container data types, or the deprecated event handler data types, such as onClick.

Arrays

For an array, set dataType to arrayItems and define each element under arrayItems.item:

Copy

Warning: Arrays in context use arrayItems.item. Arrays in data use arrayItems.dataItem.

For a list of records, such as products or teammates, set arrayItems.item to a data item and declare the fields of each record. Declare only the fields that elements use, in the form they display them, rather than the full object that an API returns:

Copy

The provider component supplies an array of objects with the same keys. To go with the list, expose any functions that act on it, such as selectTeammate, as separate items.

Nested objects

For a nested object, set dataType to data and define its fields under data.items:

Copy

Text enums

For a fixed set of strings, set dataType to textEnum and list the choices under textEnum.options:

Copy

Functions

For a function, set dataType to function and describe its signature under function.

FieldRequiredDescription
parametersNoUp to 10 parameter definitions. Omit this field for a function with no parameters.
returnsNoReturn type definition. Omit this field for a function with no response. It can't be a DOM event, or use the data types that parameters can't use.
asyncNoWhether the function returns a Promise. Defaults to false.
displayNameNoFunction name shown in the editor. Maximum 100 characters.
descriptionNoFunction description shown in the editor. Maximum 300 characters.

For example, the following function takes an ID and an optional quantity:

Copy

Parameter fields

Each function parameter supports the following fields:

FieldRequiredDescription
dataTypeExactly one of dataType and domEventType of value the parameter accepts. It can't be schema, container, or a deprecated event handler type, such as onClick. For an element event, use domEvent instead.
domEventExactly one of dataType and domEventCategory of DOM event, such as a click, that marks the parameter as the event the function handles. See Event parameters.
displayNameNoParameter name shown in the editor. Maximum 100 characters.
descriptionNoParameter description shown in the editor. Maximum 100 characters.
optionalNoWhether the parameter is optional. Only trailing parameters can be optional.
defaultValueNoDefault shown in the editor when optional is true. The provider code must handle a missing value.
arrayItemsWhen dataType is arrayItemsDefinition for each array element.
dataWhen dataType is dataFields in a nested object.
textEnumWhen dataType is textEnumAllowed string options.
functionWhen dataType is functionParameters and return type of a callback parameter.
linkWhen dataType is linkConfiguration for a link parameter, such as supported link types.
changeEventNoThe kind of input that triggers a CHANGE event. Used only when domEvent is CHANGE.

Context functions and function library functions use the same parameter fields.

Rich text

Many Wix elements accept rich text through editor binding. To expose formatted text, set dataType to richText and provide a RichText object at runtime:

Copy

For the runtime shape, see Context Provider Data Types.

See also

Last updated: 5 November 2026

Did this help?