formik-reactstrap

Formik components for reactstrap

Usage no npm install needed!

<script type="module">
  import formikReactstrap from 'https://cdn.skypack.dev/formik-reactstrap';
</script>

README

Formik components made with reactstrap

npm package

codesandbox

alt

Getting Started

Installing

npm i formik yup bootstrap reactstrap formik-reactstrap

Components

<Input/> and <InputArray/>

<Input type="text" name="name" title="Name" formikProps={props} />
<InputArray type="text" name="names" title="Names" formikProps={props} />

Props:

  • name: string
  • title?: string
  • type?: string
  • formikProps: FormikProps<Values>
  • className?: string

<Select/>

<Select
  name="color"
  title="Color"
  options={[
    { text: 'Red'; value: '#f00' },
    { text: 'Green'; value: '#0f0' },
    { text: 'Blue'; value: '#00f' },
  ]}
  formikProps={props}
/>

Props:

  • name: string
  • title?: string
  • options: <{ text: string; value: string }>[]
  • formikProps: FormikProps<Values>
  • className?: string

<Switch/>

<Switch name="employed" title="Employed" formikProps={props} />

Props:

  • name: string
  • title?: string
  • formikProps: FormikProps<Values>

<Textarea/>

<Textarea name="description" title="Description" formikProps={props} />

Props:

  • name: string
  • title?: string
  • formikProps: FormikProps<Values>
  • className?: string