-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
In this tutorial, you'll learn how to generate 10 different types of QR Codes in JavaScript, particularly React. You can see the full code on this GitHub repository, and you can see it in live-action on this website.
import { useState } from "react"; import { Button, Form } from "react-bootstrap"; function Twitter ({ setQrText }) { const [type, setType] = useState('profile') const [text, setText] = useState(''); function handleSubmit (e) { e.preventDefault(); setQrText('https://twitter.com/' + (type === 'profile' ? text : 'intent/tweet?text=' + text)); return false; } return ( Type setType(e.target.value)}> Profile Tweet Username or Tweet Text setText(e.target.value)} /> Generate ) } export default Twitter
Then, install React Bootstrap for easy styling: