vani-forms-inputs
SKILL.md
Forms and Inputs
Instructions for building forms that update on submit or preserve focus during controlled input.
When to Use
Use this when you need form handling, text inputs, or focus-safe controlled inputs.
Steps
- Keep input values in local variables and avoid re-rendering on every keystroke.
- On submit, update local state and call
handle.update(). - For controlled inputs, store a
DomRef, callhandle.updateSync(), then restore focus/selection. - Prefer splitting inputs into their own components if a sibling preview must update live.
Arguments
- submitOn - submit trigger (
submitorblur, defaults tosubmit) - useControlledInput - whether to demonstrate controlled input handling (defaults to
false) - formName - component name (defaults to
Form)
Examples
Example 1 usage pattern:
Create a contact form that updates the UI only after submit.
Example 2 usage pattern:
Implement a controlled input that preserves focus with a DomRef.
Output
Example output:
Created: src/contact-form.ts
Notes: Inputs are uncontrolled until submit.
Present Results to User
Explain the update strategy (submit vs controlled) and where focus is preserved.
name: vani-forms-inputs description: Implement Vani forms and inputs without losing focus. argument-hint: "[form or input behavior]"
Vani Forms and Inputs Command
When to use
Use this skill when handling inputs, forms, or focus-sensitive UI in Vani.
Instructions
Follow these steps:
- Keep input values in local variables.
- Read input changes via
oninputwithout callinghandle.update(). - On submit or blur, update state and call
handle.update(). - For controlled inputs, use a
DomRef, callhandle.updateSync(), then restore focus/selection.
Output expectations
- Use only
@vanijs/vanior other public packages. - Avoid re-rendering on every keystroke unless focus is preserved.
- If $ARGUMENTS is provided, adapt the strategy to that form scenario.
Weekly Installs
8
Repository
itsjavi/vaniFirst Seen
Jan 24, 2026
Security Audits
Installed on
claude-code5
gemini-cli4
windsurf4
antigravity4
github-copilot4
trae4