FormKit inputs use a reactive object to expose data to slots, rules, and the underlying schema that defines the input. This is called the context object and is found in the each input's core node object at node.context. The context object has the following properties:
_valueFormKit inputs have two values — the committed value (node._value) and the uncommitted value (node.value). At rest, these two values are equivalent, but the uncommitted value is the undebounced raw value of the input.
attrsAn object containing any attributes that will be passed to the internal input element.
fnsA small object of utility functions that are useful when writing schemas.
handlersA small object of common input handlers for use in the schema. Keep in mind that input "features" can replace or add to handlers on an input by input basis.
helpThe help text of the input provided by the help prop.
idThe unique identifier of the input. This value is auto-generated unless the id prop is set.
labelThe label of the input provided by the label prop.
messagesAn object of visible messages (where the type is not ui — ui). The key of this object is the message name, and the value is a core message object. For example, for an input displaying a single failing validation message, this object would look like:
nodeThe underlying core node of the current input. This object is not reactive (within the context of Vue).
optionsFor inputs that accept an options prop, this is a normalized array of option objects.
optionFor inputs that accept an options prop, this object is available to section keys that are inside the iteration (i.e., the label section key on a checkbox input with multiple checkboxes). The object contains a label, value, and sometimes attrs:
stateCurrent state of the input:
typeThe type of the input provided by the type prop. This is the value that should be referenced when looking up definitions in a library of inputs. Examples of this value: text, select, or autocomplete.
uiAn object of visible messages (keyed by the key) of type ui that can be used in the interface. This allows for localized text for use on interface elements.
classesA Proxy object for requesting classes. This object allows schema authors to request any section and get a generative class name. For example $classes.input would (by default without additional configuration) return formkit-input while $classes.foobar would return formkit-foobar.