FormGroup — spec¶
Synthesized from MUI
FormGroup. A wrapper for grouping multipleFormControlLabel-wrapped checkboxes. Provides spacing + optional row layout. Doesn't enforce mutual exclusivity (useRadioGroupfor that).
When to use¶
- Multi-select checkbox groups (filter options, consent checkboxes, multi-day picker).
- Inside
FormControlto group related toggles under one label.
API¶
<FormControl>
<FormLabel>관심 도메인 (복수 선택)</FormLabel>
<FormGroup>
<FormControlLabel control={<Checkbox />} label="UI/UX" />
<FormControlLabel control={<Checkbox />} label="브랜드" />
<FormControlLabel control={<Checkbox />} label="모션" />
</FormGroup>
</FormControl>
| Prop | Type | Default | Description |
|---|---|---|---|
children |
ReactNode |
— | FormControlLabel children |
row |
boolean |
false |
Layout horizontally (default vertical) |
States¶
Layout primitive — no interactive state of its own.
Tokens consumed¶
Accessibility¶
- Wrap inside
FormControlwithFormLabelto give the group an accessible name. - For required groups:
FormControl requiredpropagates to the FormLabel asterisk. - Don't rely on FormGroup alone for labeling — screen readers won't announce the group purpose without a parent label.
Edge cases¶
- Many options (10+) — switch to a multi-select Autocomplete or a search-filtered list.
rowwith long labels — wraps to next line; check at narrow viewports (320px).- Mixing checkboxes + switches — possible but visually inconsistent; prefer one control type per group.
Code example¶
<FormControl required component="fieldset">
<FormLabel component="legend">법적 동의 사항</FormLabel>
<FormGroup>
<FormControlLabel
control={<Checkbox required name="terms" />}
label="이용약관에 동의해요"
/>
<FormControlLabel
control={<Checkbox required name="privacy" />}
label="개인정보 수집·이용에 동의해요"
/>
<FormControlLabel
control={<Checkbox name="marketing" />}
label="마케팅 수신에 동의해요 (선택)"
/>
</FormGroup>
</FormControl>
Don't¶
- Don't use for radio groups — use
RadioGroup(handlesname+ mutual exclusivity). - Don't omit the parent label — the group needs an accessible name.
References¶
- MUI:
FormGroup