Home > Software engineering >  how can i make sign up form using antd library in reactjs
how can i make sign up form using antd library in reactjs

Time:08-03

I am new in using this library / I just want to know how can I make follow form with proper alignment

CodePudding user response:

You can use Grid Components to structure your from as you wish.
A simple way to do so is:

 <Form>
 <Row>
 <Col span={12}>
 <Form.Item label="First Name">
 <Input />
 </Form.Item>
 </Col>
 <Col span={12}>
 <Form.Item label="Last Name">
 <Input />
 </Form.Item>
 </Col>
 <Col span={12}>
 <Form.Item label="Phone Number">
 <Input />
 </Form.Item>
 </Col>
 <Col span={12}>
 <Form.Item label="Email Address">
 <Input />
 </Form.Item>
 </Col>
 <Col span={24}>
 <Form.Item label="Address">
 <Input />
 </Form.Item>
 </Col>
 <Col span={12}>
 <Form.Item label="City">                                                        
  <Input />                        
  </Form.Item>
  </Col>
   .
   .
   .
   
          
 </Row> 
 </Form>

Make sure too read documents:
https://ant.design/components/grid/
https://ant.design/components/form/

  • Related