A simple and elegant QR code generator built with Vue 3 and Vite. Enter any URL and instantly generate a downloadable QR code.
- Clean, modern user interface
- Instant QR code generation
- Download QR codes as PNG files
- Input validation
- Responsive design
- Keyboard shortcuts (press Enter to generate)
- Vue 3 - Progressive JavaScript framework
- Vite - Fast build tool and dev server
- qrcode - QR code generation library
- Node 24
-
Clone or download this repository
-
Install dependencies:
npm installStart the development server:
npm run devThe app will be available at http://localhost:5173
Create an optimized production build:
npm run buildThe built files will be in the dist directory.
Preview the production build locally:
npm run preview- Enter a URL in the input field
- Click "Generate QR Code" or press Enter
- The QR code will appear on the screen
- Click "Download PNG" to save the QR code to your computer
qr_generator/
├── package.json # Project dependencies and scripts
├── vite.config.js # Vite configuration
├── index.html # HTML entry point
└── src/
├── main.js # Vue app initialization
├── App.vue # Main QR generator component
└── style.css # Global styles
You can customize the QR code generation in src/App.vue:
const dataUrl = await QRCode.toDataURL(url.value, {
width: 256, // Change size
margin: 2, // Change margin
color: {
dark: '#000000', // Change QR code color
light: '#ffffff' // Change background color
}
})- Global styles:
src/style.css - Component styles:
<style scoped>section insrc/App.vue
MIT