Skip to content

ishan-im/json-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Dynamic Form Renderer from JSON πŸš€

A React application that dynamically renders forms based on a provided UI schema. Built with React, TypeScript, and Tailwind CSS.

Table of Contents

  • React: A JavaScript library for building user interfaces.
  • TypeScript: A superset of JavaScript that adds static typing to the language.
  • Tailwind CSS: A utility-first CSS framework for building modern designs.
.
β”œβ”€β”€ public
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”œβ”€β”€ elements
β”‚   β”‚   β”‚   β”œβ”€β”€ Input.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Radio.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Select.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Switch.tsx
β”‚   β”‚   β”‚   └── Toggle.tsx
β”‚   β”‚   β”œβ”€β”€ ElementRenderer.tsx
β”‚   β”‚   β”œβ”€β”€ ToolTip.tsx
β”‚   β”‚   └── UiComponents.tsx
β”‚   β”œβ”€β”€ context
β”‚   β”‚   └── Provider.tsx  
β”‚   β”œβ”€β”€ types
β”‚   β”‚   β”œβ”€β”€ component.ts
β”‚   β”‚   └── form.ts
β”‚   β”œβ”€β”€ utils
β”‚   β”‚   └── parse-label.ts
β”‚   β”œβ”€β”€ App.css
β”‚   β”œβ”€β”€ App.tsx
β”‚   └── index.tsx 
β”‚  
β”‚   
β”œβ”€β”€ .gitignore
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ package.json
└── README.md 

Deployed Link 🌐

Link to Project ⛓️

Provide JSON Schema:

  • Upon accessing the application, you'll see a screen with a text bar on the left side.
  • In the text bar, paste or provide your JSON schema for the form.

JSON Link

Screenshot 2023-12-26 110101

Generate Form:

  • After providing the JSON schema, press the "Generate Form" button.
  • On the right side, a form will be dynamically rendered based on the provided schema.
Screenshot 2023-12-26 110149

Complete the Form:

  • The rendered form will contain fields based on the JSON schema.
  • Fill in the required details using your preferences, for example, choose between Naples Style Pizza and New York Style Pizza.
Screenshot 2023-12-26 110259

Submit the Form:

  • Once you have provided the necessary details, click the "Submit" button.
  • After submission, a modal will appear displaying the JSON details of your order.
Screenshot 2023-12-26 110327

For Pasta Form Choose the JSON

Pasta JSON

Screenshot 2023-12-26 110419 Screenshot 2023-12-26 110441