Function group

Creates a group component that can contain other UI elements.

Either the content to display or the options object

Configuration object

CSS class name for custom styling

Title of the group that can render any React node

Description text for the group that can render any React node

if true, the group will be collapsible

if true, the group will be collapsed by default

The content to display (only used when options are provided)

A JSX element representing the group component

Basic usage with content

group([
inputField({
name: 'firstName',
label: 'First name',
defaultValue: 'John',
}),
inputField({
name: 'lastName',
label: 'Last name',
defaultValue: 'Doe',
}),
]);

Usage with options and content

group(
{
className: 'custom-group',
title: 'Personal Information',
description: 'Please fill in your details',
collapsible: true,
initialCollapsed: false
},
[
inputField({
name: 'email',
label: 'Email',
type: 'email',
}),
]
);