Form / foldkit-mixins-form
Mental model
Form.make(...) the form: controls + bundle (no view)
|
FormView.field(form) one field, as a SlotView over FieldSlots
| .pipe(Style.attach(...))
FormView.define(form, { field }) the whole form, as a SlotView over FormSlots
| .pipe(Style.attach(...))
FormView.submodel(form, view) a Submodel view taking { options, words }
|
form.bundle.pipe(Bundle.withView(...)) the same Bundle, now drawable
|
placed.view(model, h, { options })There are two slot contracts because a form is one thing and its fields are
many: FieldSlots is resolved once per field, with that field as its input, so
a Style can depend on input.invalid or input.control.
Install
sh
pnpm add effect foldkit foldkit-bundle foldkit-form foldkit-mixins foldkit-mixins-form