Form Patterns
FormSection
A fieldset with a title and description, for splitting a long form into groups.
Import
import {
FormSection,
FormSectionHeader,
FormSectionTitle,
FormSectionDescription,
FormSectionContent,
} from "@mikenotthepope/substrateui"Composition
FormSection
├── FormSectionHeader
│ ├── FormSectionTitle
│ └── FormSectionDescription
└── FormSectionContentGrid Layout
API Reference
FormSection
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS classes to apply to the fieldset element. |
childrenrequired | React.ReactNode | — | Should contain FormSectionHeader and FormSectionContent sub-components. |
FormSectionHeader
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS classes for the header container. |
childrenrequired | React.ReactNode | — | Title and description elements for the section. |
FormSectionTitle
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS classes for the legend heading. |
childrenrequired | React.ReactNode | — | The section title text. |
FormSectionDescription
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS classes for the description paragraph. |
childrenrequired | React.ReactNode | — | Descriptive text explaining the purpose of the section. |
FormSectionContent
| Prop | Type | Default | Description |
|---|---|---|---|
layout | "stack" | "grid" | "stack" | Controls the layout of child fields. Stack arranges vertically, grid uses a two-column layout on medium screens. |
className | string | — | Additional CSS classes for the content container. |
childrenrequired | React.ReactNode | — | The form fields within this section. |