<FieldGroup.Item>
An item within a <FieldGroup>. Wrap each item in one for consistent spacing.
The nodes passed by renderFields and the fields override are already wrapped.
import { Puck, FieldGroup } from "@puckeditor/core";
export function Editor() {
return (
<Puck>
<FieldGroup label="Appearance">
<FieldGroup.Item>
<input type="text" value="#000000" onChange={() => {}} />
</FieldGroup.Item>
</FieldGroup>
</Puck>
);
}Props
| Prop | Example | Type | Status |
|---|---|---|---|
children | children: <div /> | ReactNode | Required |
className | className: "MyItem" | String | - |
Required props
children
A React node with the contents of the item, like a field.
Optional props
className
Define a custom class for the item.