HomeStarbucks Pattern Library

CheckboxField

Notes

A form field to support the use of a checkbox within <FieldBase>

Props

  • classNamestring

    styling is passed to <FieldBase> childWrapperClassName

  • checkboxIdstring
  • floatLabelstring

    label that displays as float label when checkbox is in active checked state

  • labelstring*

    label that displays when checkbox is in unchecked state

  • useInactiveStylebool

    Styling that will make the field appear greyed out and recessed

  • onUpdatefunc[() => {}]

    Function that will get called on checkbox click

  • checked[false]
<CheckboxField
checkboxId="cheese-checkbox"
floatLabel="Sandwich Options"
label="Cheese"
/>;