Skip to content

CheckboxField

A checkbox input for boolean (true/false) values.

PropTypeDefaultDescription
value(instance: TCommand) => unknownRequired. Accessor function returning the property value from the command instance.
titlestringThe label for the field (shown when showTitles is enabled).
labelstringLabel text displayed next to the checkbox.
requiredbooleanOverride automatic required detection.
<CheckboxField<UserCommand>
value={c => c.agreeToTerms}
title="Terms of Service"
label="I agree to the terms and conditions"
/>
<CheckboxField<UserCommand>
value={c => c.newsletter}
title="Newsletter"
label="Send me newsletter updates"
/>