React Page SectionsComponents
Settings Components
Build consistent, accessible settings forms and security/profile sections with Puzzle Pieces.
Settings compositions provide layout and semantic structure only. Data loading, validation, and mutations remain in the application.
Beta API maturity: Beta. These compositions are new and may evolve based on feedback.
Installation
import {
FormActions,
ProfileHeader,
SecurityMethodCard,
SettingsGroup,
SettingsRow,
SettingsSection,
} from "@puzzle-ui/pieces";Sections and rows
Use SettingsSection for a labelled settings area and SettingsGroup to organize related rows. Associate each form control with its label through htmlFor and the control's id.
Profile and security
FormActions provides a labelled group for submit and cancel controls.
Accessibility and responsive behavior
- Sections and groups are labelled by their headings.
- Supply
htmlForand matching control IDs for form labels. - Keep each control's accessible description association in the consuming form when needed.
- Layouts stack on narrow viewports and use Puzzle theme tokens.
API
| Component | Props |
|---|---|
SettingsSection | title and children (required), description, actions, className |
SettingsGroup | children (required), title, className |
SettingsRow | label, control (required), description, htmlFor, className |
FormActions | children (required), className |
ProfileHeader | name (required), email, avatar, actions, className |
SecurityMethodCard | title (required), description, status, icon, action, className |