Form / foldkit-mixins-form
Apply theme recipes to fields and forms
foldkit-mixins-form/recipes ships token-driven Styles matching foldkit-mixins-ui (install foldkit-mixins-ui as a peer to use /recipes or /ui):
ts
import { Field, Form } from 'foldkit-mixins-form/recipes'
const Looked = FormView.define(Edit, {
field: FormView.field(Edit).pipe(Style.attach(Style.forSlots(FieldSlots)(Field({})))),
}).pipe(Style.attach(Style.forSlots(FormSlots)(Form({}))))Field({}) arranges each label above its control with errors in error ink, sizing inputs to match foldkit-mixins-ui fields. Form({}) stacks fields in a column with the validation summary and a primary submit button. Extend recipes with .extend(...) rather than forking them.