Skip to content

Examples ​

Checkbox ​

Checkboxes ​

When working with multiple checkboxes, it can be useful to store the value in an array rather than a simple boolean indicating if the checkbox is checked. Checkboxes sharing the same value will be synced and checked or unchecked together.

Radio ​

Radio inputs sharing the same native name inside a DataScope behave as a single keyed value: the checked radio is the current source, and selecting another one updates every subscriber for that key.

Select ​

Select multiple ​

Number ​

Number inputs resolve their value with the valueAsNumber property, so computed callbacks and mutation helpers such as increment() work with a real number.

Date ​

Date inputs resolve their value with the valueAsDate property. The bound value is a Date object (or null when empty), so it can be formatted freely in virtual bindings or computed callbacks.

Textarea ​

Textareas behave like text inputs and bind their value property.