Custom Wizard With View
Use this pattern when:
- built-in wizard visuals are not enough
- navigation must match an existing product shell
- steps need app-specific chrome
import { createFormView } from "mlform/view";
const view = createFormView({ transport, schema, layout: { kind: "wizard", steps: [ { title: "Profile", children: [{ kind: "field", field: "name" }] }, { title: "Review", children: [{ kind: "field", field: "email" }] }, ], },});
view.subscribe((snapshot) => render(snapshot));Host actions:
- previous button ->
view.navigation.previous() - next button ->
await view.navigation.next() - final submit ->
await view.submit()
Keep the layout config the same if you later switch to mountForm().