Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
How to add Formik in Storybook with MDX

I am trying to add an Input story in Storybook.

This story is an input field, so it uses Formik's <Field/> tag.

However, when I try to view the story in the browser, nothing appears.

I've added the 'storybook-formik/register' in .storybook/main.js, but nothing changes.

This is my code:

// Input.js
import React from 'react'
import {Field} from 'formik'

export default function Input({type, name, placeholder, dataId}) {
  return (
    <Field
      type={type}
      name={name}
    />
  )
}
// Input.stories.mdx
import Input from './Input'
import {Canvas, Meta, Story} from '@storybook/addon-docs'

<Meta title="forms/Input" component={Input} />

export const Template = (args) => <Input {...args} />

# An input box

<Canvas>
  <Story
    name="input-box"
    args={{
      type: 'text',
      name: 'Email',
    }}>
    >{Template.bind({})}
  </Story>
</Canvas>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!