9.5k

Form

A form wrapper component that simplifies validation and submission.

API Reference

Installation

Usage

API Reference

Form

Thin wrapper around Base UI Form with no default layout. Pass className for spacing and structure (for example flex w-full flex-col gap-4 for a vertical field stack).

Dialog, sheet, drawer: Place DialogHeader (or sheet/drawer header) outside the form. Wrap DialogPanel and DialogFooter only in <Form className="contents"> (or <form className="contents">). The contents display value keeps panel and footer participating correctly in the popup flex layout without nesting the header inside the <form>.

Examples

Using with Zod

Changelog

  • Apr 17, 2026Form no longer applies default layout classes; pass className for stacked fields (flex w-full flex-col gap-4); for overlays, wrap panel + footer in Form className="contents" with header outside.

coss.com ui

Built by and for the team of Cal.com, Inc. — the leading commercial open source company (“coss”).