A modern, responsive React application that generates QR codes from user URLs with download and share functionality.
- 🎯 URL Input: Enter any valid URL to generate a QR code
- 📱 Responsive Design: Works perfectly on desktop, tablet, and mobile devices
- 🎨 Modern UI: Beautiful gradient design with smooth animations
- 📥 Download: Save QR codes as high-quality PNG images
- 📤 Share: Share QR codes directly or copy URLs to clipboard
- ✅ URL Validation: Ensures only valid URLs are processed
- 🚀 Fast: Built with Vite for lightning-fast development and builds
- React 18 with TypeScript
- Vite for fast development and building
- QRCode.js for QR code generation
- html2canvas for image capture and download
- Modern CSS with gradients, shadows, and animations
- Node.js (version 16 or higher)
- npm or yarn
-
Clone the repository or navigate to the project directory:
cd qr-generator -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
To create a production build:
npm run buildThe built files will be in the dist directory.
To preview the production build locally:
npm run preview- Enter a URL: Type or paste any valid URL into the input field
- Generate QR Code: Click the "Generate QR Code" button or press Enter
- Download: Click the download button to save the QR code as a PNG image
- Share: Use the share button to share the QR code or copy the URL to clipboard
src/
├── App.tsx # Main application component
├── App.css # Application styles
├── main.tsx # Application entry point
├── index.css # Global styles
└── assets/ # Static assets
- Generates high-quality QR codes (300x300px)
- Supports any valid URL format
- Customizable colors and margins
- Error handling for invalid URLs
- Converts QR code to high-resolution PNG
- Automatic filename generation with timestamp
- High-quality image capture using html2canvas
- Native sharing on supported devices
- Fallback to clipboard copying
- Graceful error handling
- Mobile-first approach
- Adaptive layouts for different screen sizes
- Touch-friendly interface elements
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.
- Built with React
- Powered by Vite
- QR code generation by QRCode.js
- Image capture by html2canvas