Problem
stx already transforms v-model on components into a prop plus an update event, including named models. Component authors still have to connect incoming reactive props to outgoing updates manually.
A first-class model helper would make TextInput, Switch, Select, and Dialog-style components easier to author consistently.
Existing foundation
Reviewed at 7d93c4c: vue-template.ts supports named v-model transforms but explicitly leaves their modifiers unfinished. useReactiveProp and defineEmits provide related primitives.
The repository already uses defineModel for database models. Choose a non-conflicting component API name (for example useModel), rather than repurposing that name.
Scope and acceptance criteria
- Expose a signal-shaped helper for a default model and named models.
- Parent updates propagate into the child; child writes emit the appropriate update event.
- Support multiple independent models on one component without feedback loops.
- Define defaults, typing, and supported modifier/transform semantics; do not silently discard named modifiers.
- Keep module and generated-browser implementations consistent.
- Verify behavior using real component interactions, including teardown and re-mount.
- Document the pattern and adopt it in a small representative subset of @stacksjs/components.
Prior art: Vue component v-model.