dynamic-forms / Interface

GroupField

Generic types:TFields
Extends:FieldDef<never>

Group field interface for creating logical field groupings that map to object values Groups create nested form structures where child field values are collected into an object This is a programmatic grouping only - users cannot customize this field type

TypeScript cannot enforce field nesting rules due to circular dependency limitations. For documentation: Groups should contain rows and leaf fields, but NOT pages or other groups. Runtime validation enforces these rules.

Properties

NameTypeDescription
className
inherited from FieldDef
string | undefined

Additional CSS classes for custom styling.

Space-separated string of CSS class names that will be applied to the field container for custom styling.

Example usage
className: 'highlight required-field'
className: 'mt-4 text-center'
col
inherited from FieldDef
number | undefined

Column sizing configuration for responsive grid layout.

Specifies how many columns this field should span in a 12-column grid system. Supports responsive behavior and field arrangement.

Example usage
col: 12  // Full width
col: 6   // Half width
col: 4   // One third width
col: 3   // Quarter width
disabled
inherited from FieldDef
boolean | undefined

Whether the field is disabled and cannot be interacted with.

When true, the field is rendered in a disabled state and cannot receive user input. The value can still be modified programmatically.

@value false

fields
r
TFields
hidden
inherited from FieldDef
boolean | undefined

Whether the field is hidden from view.

When true, the field is not rendered in the UI but still participates in form state and validation. Useful for conditional field display.

@value false

key
inherited from FieldDef
string

Unique field identifier used for form binding and value tracking.

This key is used to associate the field with form values and must be unique within the form. It follows object property naming conventions.

Example usage
// Simple field key
key: 'email'

// Nested object notation
key: 'address.street'

// Array notation
key: 'hobbies[0]'
label
r
overrides FieldDef
undefined

Groups do not have a label property - they are logical containers only *

props
inherited from FieldDef
TProps | undefined

Field-specific properties and configuration options.

Contains type-specific configuration that varies based on the field type. The shape is defined by the TProps generic parameter.

Example usage
// Input field props
props: { placeholder: 'Enter email', type: 'email' }

// Select field props
props: { options: [{ label: 'Yes', value: true }], multiple: false }

// Button field props
props: { buttonType: 'submit', variant: 'primary' }
readonly
inherited from FieldDef
boolean | undefined

Whether the field is read-only.

When true, the field displays its value but cannot be modified by user interaction. Differs from disabled in styling and accessibility.

@value false

tabIndex
inherited from FieldDef
number | undefined

Tab index for keyboard navigation.

Controls the order in which fields receive focus when navigating with the Tab key. Follows standard HTML tabindex behavior.

Example usage
tabIndex: 1    // First field in tab order
tabIndex: -1   // Excluded from tab navigation
tabIndex: 0    // Natural tab order
type
overrides FieldDef
"group"

Field type identifier for component selection.

Determines which component will be rendered for this field. Must match a registered field type name in the field registry.

Example usage
type: 'input'     // Text input field
type: 'select'    // Dropdown selection
type: 'checkbox'  // Boolean checkbox
type: 'group'     // Field group container