

Every state


default


focus


open


focus-field


errors


partly-valid


filled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "drawer-form" | Id prefix; field ids are <id>-<field>. |
| openLabel | string | "Delivery details" | Trigger text. |
| title | string | "Delivery details" | Drawer heading. |
| description | string | – | Line under the heading. |
| submitLabel | string | "Use these details" | Submit button text. |
| emptyErrors | Record<FieldName, string> | – | Error under a required field left empty. |
| invalidErrors | Partial<Record<FieldName, string>> | – | Error under a filled field that fails its check. |
| defaultValues | Partial<DrawerFormValues> | {} | Starting values. |
| onSubmit | (values: DrawerFormValues) => void | – | Called when every field passes; the drawer closes after. |
| open | boolean | – | The drawer is open (controlled). |
| defaultOpen | boolean | – | Opens the drawer on mount (previews and sheets). |
| onOpenChange | (open: boolean) => void | – | Called when the drawer opens or closes. |
| contained | boolean | – | Draws the panel inside the nearest relative parent instead of fixed over the page. For previews and sheets; leave off on a real page. |
| className | string | – | Extra classes on the wrapper. |
More drawers
All 4drawer-02 is in UI ProGet UI Pro, €199


