Skip to content

Tabs Built-in vs Headless

Choose mountTabsForm() when you want:

  • built-in tab chrome
  • built-in submit footer
  • minimal host code
  • MLForm primitives rendered for you

Choose createFormView() when you want:

  • app-owned navigation
  • custom badges, counters, or side panels
  • different tabs on desktop and mobile
  • a non-Lit host such as React or Vue
const layout = {
kind: "tabs",
tabs: [
{ title: "Profile", children: [{ kind: "field", field: "name" }] },
{ title: "Results", children: [{ kind: "report", report: "risk" }] },
],
};

Built-in:

mountTabsForm(container, { schema, transport, layout });

Headless:

const view = createFormView({ schema, transport, layout });
const snapshot = view.getSnapshot();