Browse components

FormLabel

import FormLabel from "@shpaw415/mui-lite/FormLabel";

Why use it

FormLabel labels a group of controls (radio sets, checkbox groups) or a generic form section. Unlike InputLabel it does not float over an input — use it above FormGroup or as a fieldset legend-style caption.

Demo

Example

import FormLabel from "@shpaw415/mui-lite/FormLabel";
import FormGroup from "@shpaw415/mui-lite/FormGroup";
import FormControlLabel from "@shpaw415/mui-lite/FormControlLabel";
import CheckBox from "@shpaw415/mui-lite/CheckBox";
 
<>
  <FormLabel component="legend">Notifications</FormLabel>
  <FormGroup>
    <FormControlLabel control={<CheckBox />} label="Email" />
    <FormControlLabel control={<CheckBox />} label="SMS" />
  </FormGroup>
</>

Props

PropTypeDefault
requiredboolean
error / disabled / focusedbooleanfrom FormControl
componentelement typelabel
htmlForstringfrom FormControl