---
name: Checkbox
menu: Inputs
---

import { Playground, PropsTable } from 'docz';
import { Formik, Field } from 'formik';

import { CheckboxPrimitive, Checkbox } from '../Checkbox';

# Checkbox

<PropsTable of={CheckboxPrimitive} />

## Basic usage

<Playground>
  <CheckboxPrimitive />
</Playground>

## As form field

<Playground>
  <Formik
    render={values => (
      <form>
        <pre>{JSON.stringify(values, null, 2)}</pre>
        <br />
        <Field name="myToggle" component={Checkbox} defaultChecked />
      </form>
    )}
  />
</Playground>
