Skip to content

Forms · Sections

Sections and repeating groups

A long form is a document: sections with real headings, fieldsets for the questions that need one, and repeating rows with add, remove and reorder. The chrome is LUC's; the array lives in your state — or in `useFieldArray`.

import { FieldArray, FormSection } from "@luc/ui";

Examples

A sectioned settings form

Tabs switch sections without pretending to be navigation: the form is one surface, and each tab is a Chapter of it.

Profile

How this workspace appears in reports and shares.

Used in chart legends.

2 endpoints configured

Density without losing touch targets

A form can be dense; it must not be small. Compact spacing changes the gap between rows, never the size of a control.

Usage

import { FieldArray, FormSection } from "@luc/ui/forms";
<FormSection title="Universe" description="Which instruments are in scope." columns={2}>
  <Field label="Sector">
    <Input defaultValue="Technology" />
  </Field>
</FormSection>

A section is a heading and a description; the fields inside own their own labels, and the grid collapses to one column on a narrow screen.

API

This page shows components working together rather than exporting one of its own, so the props live on the pages below — each link opens that page's API table.

Luc UI v1.0Sections and repeating groupsdark theme