Checkbox
MoleculeLabel + checkbox + optional hint / error message. aria-describedby is wired up and border-error is applied on the error state.
<Checkbox id="accept" label="I agree to the Terms of Service" onChange={handleChange} /><Checkbox id="accept" label="I agree to the Terms of Service" />We send weekly updates, no spam.
<Checkbox id="newsletter" label="Subscribe to newsletter" hint="We send weekly updates, no spam." />You must accept the terms.
<Checkbox id="accept" label="I agree to the Terms of Service" error="You must accept the terms." /><Checkbox id="accept" label="Checked and disabled" defaultChecked disabled />// Set indeterminate prop to show mixed state:
<Checkbox id="all" label="Select all" checked={allChecked} indeterminate={someChecked} onChange={toggleAll} />