QR Code

A clean QR code component with rounded dots and beautiful gradient presets.

The QRCode component generates crisp, scannable QR codes with rounded dots and optional gradient presets.

Preview

Usage

Installation

$ pnpm dlx shadcn add https://klarden.vercel.app/r/qr-code.json

Examples

Gradient Presets

Default
Ocean
Sunset
Forest
Berry
Twilight
Aurora
Fire
Neon
Rose
Mint

Properties

PropTypeDefaultDescription
valuestringThe URL or data to encode. Required.
sizenumber160Overall size of the QR code in pixels.
fgColorstring"var(--foreground)"Foreground color when no gradient is applied.
bgColorstring"var(--background)"Background color. Automatically adapts to dark/light mode.
errorCorrectionLevel"L" | "M" | "Q" | "H""M"Error correction level. L (7%), M (15%), Q (25%), H (30%).
gradientGradientPreset"default"Gradient preset. Options: default, ocean, sunset, forest, berry, twilight, aurora, fire, neon, rose, mint.
classNamestringAdditional CSS classes for the SVG element.