Fields

PreviousNext

Display multiple field values side-by-side with editable and read-only modes, drag-and-drop reordering

A flexible fields component system that displays multiple data fields in responsive layouts. Supports both read-only display and editable form inputs, with optional drag-and-drop reordering and dynamic field management.

Basic Read-Only Display

Display product attributes or data fields in a clean, organized grid layout.

PRD-12345

$299.99

48 units

Electronics

Editable Form Fields

Create dynamic forms with multiple field types including text, email, tel, and more.

Three Column Layout

Display more fields in a compact three-column grid that adapts to mobile screens.

$142,500

1,284

3.2%

$111

892

+12.5%

Single Column Stack

Perfect for mobile-first layouts or narrow containers where fields should stack vertically.

With Descriptions and Errors

Add helpful descriptions and display validation errors for better user experience.

Choose a unique username (3-20 characters)

Select Fields

Use dropdown selects for predefined options.

Compact Variant

Use the compact variant for denser layouts with reduced spacing.

Props

Fields Props

PropTypeDefaultDescription
fieldsFieldItemData[]-Array of field objects to display
layout"grid" | "stack" | "inline""grid"Layout strategy for fields
columns1 | 2 | 3 | 4 | "auto"2Number of columns for grid layout
gap"none" | "sm" | "md" | "lg" | "xl""md"Spacing between fields
variant"editable" | "readonly" | "compact""editable"Display mode for all fields
size"default" | "sm" | "lg""default"Size variant for all fields
orientation"vertical" | "horizontal""vertical"Label/input orientation
enableReorderingbooleanfalseEnable drag-and-drop reordering
enableAddRemovebooleanfalseEnable add/remove field buttons
showSeparatorsbooleanfalseShow separators between fields
onChange(fields) => void-Called when fields array changes
onFieldChange(id, value) => void-Called when a field value changes
onFieldsReorder(fields) => void-Called after fields are reordered
onFieldAdd() => FieldItemData-Function that returns new field data
onFieldRemove(id) => void-Called when a field is removed
addFieldLabelstring"Add Field"Label for add field button
showToolbarbooleanenableAddRemoveShow the toolbar
toolbarActionsReactNode-Custom toolbar actions
classNamestring-Additional CSS classes
classNamesobject-CSS classes for sub-components

FieldItemData Interface

PropertyTypeDescription
idstring | numberUnique identifier for the field
labelstringField label text
valuestring | numberField value
descriptionstringHelper text below the field
placeholderstringPlaceholder text for inputs
type"text" | "number" | "email" | "tel" | "url" | "date" | "textarea" | "select"Input type
requiredbooleanMark field as required
disabledbooleanDisable field interaction
errorstringError message to display
optionsArray<{label: string, value: string}>Options for select type
rowsnumberNumber of rows for textarea
render(field) => ReactNodeCustom render function