Form Ownership And State Defaults
Pack:
shadcnParent skill: shadcn Forms And Field Primitives Source:shadcn/shadcn-forms-and-field-primitives/references/form-ownership-and-state-defaults.mdDefault form posture:
- choose one form-state strategy
- keep field presentation separate from validation rules
- keep submission logic outside the field component layer
- extract wrappers only when repeated field structure is obvious
Good default split:
- form-state library owns value, touched state, validation lifecycle, and submission orchestration
- shadcn field layer owns labels, descriptions, layout, and visual error presentation
Escalate to a richer form-state layer when:
- state orchestration is the hard part
- async reactivity is central
- the feature has large dynamic field behavior