FormGrid
A responsive one-to-four-column grid for arranging form fields with consistent spacing.
Installation
tsx
import { FormGrid, Field, Input } from "madagent";Two-column form
Column options
1 columns
2 columns
3 columns
4 columns
Responsive collapse
| Prop | Type | Default | Description |
|---|---|---|---|
columns | 1234 | 1 | Number of equal-width columns before the responsive collapse |
children* | ReactNode | - | Fields or other form content placed in the grid |
RTL Support
Components automatically adapt to right-to-left languages using CSS logical properties.
Preview
Usage
tsx
<FormGrid columns={2}>
<Field label="الاسم الأول"><Input /></Field>
<Field label="اسم العائلة"><Input /></Field>
</FormGrid>