just installed and copied example code
npm install --save-dev antd-form-builder
import React from 'react'
import { Form, Button } from 'antd'
import FormBuilder from 'antd-form-builder'
export default () => {
const [form] = FormBuilder.useForm()
const meta = {
fields: [
{ key: 'username', label: 'User Name' },
{ key: 'password', label: 'Password', widget: 'password' },
],
}
return (
<Form form={form}>
<FormBuilder meta={meta} form={form} />
<Form.Item wrapperCol={{ span: 16, offset: 8 }}>
<Button type="primary">Login</Button>
</Form.Item>
</Form>
)
}
just installed and copied example code
npm install --save-dev antd-form-builder