Cells
Compact renderers used inside array table layouts. Pass them via the cells prop on JsonForms.
Cells are lightweight renderers designed for compact contexts — specifically inside the ArrayLayout where each field renders inline without labels or extra padding.
They mirror the controls exactly in behaviour, but use withJsonFormsCellProps instead of withJsonFormsControlProps, and are passed via the separate cells prop on <JsonForms />.
Setup
Cells are included in the main bundle. If you installed index.json, you already have them:
import { JsonForms } from '@jsonforms/react';
import { jsonFormsCells, jsonFormsRenderers } from '~/components/forms/renderers';
<JsonForms
schema={schema}
uischema={uischema}
data={data}
renderers={jsonFormsRenderers}
cells={jsonFormsCells}
onChange={({ data }) => setData(data)}
/>Or install individually:
npx shadcn@latest add https://mksingh.dev/r/jsonforms-text-cell.jsonAvailable cells
TextCell
Handles string fields. Rank 1.
npx shadcn@latest add https://mksingh.dev/r/jsonforms-text-cell.jsonNumberCell
Handles number fields. Uses valueAsNumber. Rank 1.
npx shadcn@latest add https://mksingh.dev/r/jsonforms-number-cell.jsonIntegerCell
Handles integer fields. Truncates decimals via Math.trunc. Rank 1.
npx shadcn@latest add https://mksingh.dev/r/jsonforms-integer-cell.jsonBooleanCell
Handles boolean fields. Renders a compact Checkbox. Rank 1.
npx shadcn@latest add https://mksingh.dev/r/jsonforms-boolean-cell.jsonBooleanToggleCell
Switch variant for boolean fields. Activated by options.toggle: true. Rank 2.
npx shadcn@latest add https://mksingh.dev/r/jsonforms-boolean-toggle-cell.jsonDateCell
Handles "format": "date" fields. Rank 1.
npx shadcn@latest add https://mksingh.dev/r/jsonforms-date-cell.jsonTimeCell
Handles "format": "time" fields. Rank 1.
npx shadcn@latest add https://mksingh.dev/r/jsonforms-time-cell.jsonEnumCell
Handles enum array fields. Renders a compact Select. Rank 2.
npx shadcn@latest add https://mksingh.dev/r/jsonforms-enum-cell.jsonOneOfEnumCell
Handles oneOf enum schemas where options have const/title pairs. Rank 2.
npx shadcn@latest add https://mksingh.dev/r/jsonforms-oneof-enum-cell.jsonNumberFormatCell
Number cell that displays the value formatted with Intl.NumberFormat when unfocused (e.g. 1,234.56), and switches to a raw number input on focus. Rank 4 — overrides NumberCell by default.
npx shadcn@latest add https://mksingh.dev/r/jsonforms-number-format-cell.jsonCell priority reference
| Cell | Rank | Activated by |
|---|---|---|
TextCell | 1 | string type |
NumberCell | 1 | number type |
IntegerCell | 1 | integer type |
BooleanCell | 1 | boolean type |
DateCell | 1 | date format |
TimeCell | 1 | time format |
EnumCell | 2 | enum array |
OneOfEnumCell | 2 | oneOf enum |
BooleanToggleCell | 2 | boolean + options.toggle: true |
NumberFormatCell | 4 | number type (overrides NumberCell) |
If you don't want
NumberFormatCellto override plain number inputs, remove it from thejsonFormsCellsarray incomponents/forms/renderers/index.ts— since you own the file, this is a one-line change.