CheckboxInput
A controlled checkbox input intended for use with Formik.
Props
-
label
(string) - Label text, HTML is allowed. -
field
(object) - Props for the input element, supplied by Formik . https://jaredpalmer.com/formik/docs/api/field . -
form
(object) - Form data includingerror
andtouched
info, supplied by Formik . https://jaredpalmer.com/formik/docs/api/field . -
theme
(object) [optional] - Controls the appearance of the checkbox.theme.background
should be one of["light", "dark", "brand"].
Dependents:
hashi-newsletter-signup-form
Release Notes
0.0.0-alpha.0
This component has been created as a controlled input intended for use with Formik. Formik's <Field>
component drives much of this component's prop structure.
If you're migrating to this component from boolean-input
, you will likely need to refactor code significantly, as you'll need to implement the related form with Formik. If you haven't used Formik in a while (or ever!), the Formik overview, particularly the Basic example form, is probably the easiest place to start.