form-binding

Bind writable signals to form fields in rikka-dom for automatic synchronization.

6|1|Updated May 31, 2026
One-click install
npx skills add https://github.com/yw662/rikka --skill form-binding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: form-binding
Source: https://github.com/yw662/rikka/tree/main/skills/form-binding
Command: npx skills add https://github.com/yw662/rikka --skill form-binding

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the manual wiring needed to keep form inputs and application state in sync, so user edits update your data model automatically and programmatic state changes update the UI.

Core Features & Use Cases

  • Text Inputs and Textareas: Bind writable signals to value for live, two-way updates as users type.
  • Checkboxes and Selects: Bind writable signals to checked and selectedIndex with the correct DOM event semantics.
  • Validation and Reactive UI: Combine form state with computed values to drive inline validation, disabled buttons, and live feedback.
  • Use Case: Build a profile form where typing a name, toggling consent, and choosing an option all update shared reactive state immediately.

Quick Start

Bind a writable signal to an input, textarea, checkbox, or select in rikka-dom so the field and signal stay synchronized automatically.

Frequently Asked Questions about form-binding

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync form inputs with signals automatically?

Two-way form binding syncs writable signals to form fields automatically, so user input updates your data model and programmatic state changes reflect in the UI. This removes manual event wiring for text inputs, textareas, checkboxes, and selects.

How does two-way binding handle checkboxes and selects in rikka-dom?

Two-way binding for checkboxes and selects maps writable signals to the checked and selectedIndex properties respectively, using correct DOM input and change event semantics. This ensures application state stays synchronized with user selections without manual listeners.

Can I use signal state to drive live form validation and reactive UI updates?

Yes, you can combine form signal state with computed values to drive inline validation, disabled buttons, and live feedback. Signal state updates immediately as users type or toggle, keeping reactive display logic continuously synced with input fields.

What is the best way to bind a textarea value to a reactive signal?

The best way to bind a textarea is connecting a writable signal directly to its value property for live two-way updates. This ensures typing inside the textarea instantly updates shared reactive state and any dependent computed values.

Do I need manual event listeners for text input value binding?

No, manual event listeners are not needed for text input value binding. The form binding mechanism wires writable signals to input fields directly, handling input and change event semantics internally to keep user edits and application state synchronized automatically.

Why does my select element not update when changing a writable signal?

Select elements require binding to selectedIndex rather than value, using correct change event semantics. If the writable signal is not properly mapped to selectedIndex, programmatic state changes will fail to update the select element UI synchronously.