Grouped Form

The System Settings layout: titled sections of rounded groups, each row a label and a control.

@cupertinoui/grouped-formRegistry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/grouped-form

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import {
  GroupedForm,
  GroupedFormGroup,
  GroupedFormRow,
  GroupedFormRowControl,
  GroupedFormRowTitle,
  GroupedFormSection,
  GroupedFormSectionTitle,
} from "@/components/ui/grouped-form"

<GroupedForm>
  <GroupedFormSection>
    <GroupedFormSectionTitle>Dock</GroupedFormSectionTitle>
    <GroupedFormGroup>
      <GroupedFormRow>
        <GroupedFormRowTitle>Automatically hide and show the Dock</GroupedFormRowTitle>
        <GroupedFormRowControl>
          <Switch size="mini" />
        </GroupedFormRowControl>
      </GroupedFormRow>
    </GroupedFormGroup>
  </GroupedFormSection>
</GroupedForm>
Rows are 36pt tall, or about 37.5pt when they hold a pop-up button, separated by hairlines, as measured in System Settings on macOS 27.

API Reference

Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.

GroupedForm

The scrolling content of a settings pane.

PropTypeDescription
classNamestringExtra classes, merged with the component's own.

GroupedFormSection / GroupedFormSectionTitle

PropTypeDescription
classNamestringExtra classes, merged with the component's own.

GroupedFormGroup

One rounded box of rows.

PropTypeDescription
classNamestringExtra classes, merged with the component's own.

GroupedFormRow

PropTypeDescription
classNamestringExtra classes, merged with the component's own.

GroupedFormRowLabel / GroupedFormRowTitle / GroupedFormRowDescription

The left side: a title with an optional description.

PropTypeDescription
classNamestringExtra classes, merged with the component's own.

GroupedFormRowControl

The right side: switches, pop-ups, checkboxes.

PropTypeDescription
classNamestringExtra classes, merged with the component's own.