Skip to main content

mo.ui.form

Wrap UI elements to create a form that only updates when submitted.

Overview

Forms prevent UI elements from triggering reactivity on every change. Instead, values are only sent when the form is submitted.

Usage

Or use the form() method on any UI element:

Examples

Form Behavior

  • Values don’t update until form is submitted
  • Submit button appears automatically
  • Form can be submitted by clicking button or pressing Enter
  • form.value is None until first submission
Use forms to batch multiple input changes together, reducing unnecessary computation.

Batch

Combine multiple UI elements

Interactive Elements

Guide to UI elements