DDBS UI
dashboard

QR Code

A QR style code drawn from a seed string in the current text colour. Decorative, not scannable.

npx shadcn@latest add https://ui.develop-better-solutions.com/r/dash-qr-code.json
Fullscreen
cameron-williamson
order-10428
ticket-b17

Usage

dash-qr-code-example.tsx
import { DashQrCode } from "@dbs/ui";
import { DashScope } from "./_store";

export default function DashQrCodeExample() {
  return (
    <div className="w-full max-w-md">
      <DashScope minHeight={0}>
        <div className="flex flex-wrap items-end gap-6">
          {["cameron-williamson", "order-10428", "ticket-b17"].map((s, i) => (
            <figure key={s} className="flex flex-col items-center gap-2">
              <DashQrCode seed={s} size={[56, 88, 120][i]} label={`Code for ${s}`} />
              <figcaption className="text-[11px] text-[var(--dash-muted)]">{s}</figcaption>
            </figure>
          ))}
        </div>
      </DashScope>
    </div>
  );
}