QR Code Display
A scannable code with its amount, recipient, and expiry.
- Status
- ReadyBuild day 21 of 21
- Code
- In React
- Role
- Display
Usage
This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.
Rp150.000
Valid for 04:59
Pastes as editable layers. Shadows are not exported.
import type { ReactNode } from "react";
import { QrCodeDisplay } from "@/ui";
export default function QrDemo({ qrSvg }: { qrSvg: ReactNode }) {
return (
<QrCodeDisplay
type="dynamic"
label="Warung Natuna"
qr={qrSvg}
value="Rp150.000"
expiry="Valid for 04:59"
onSave={() => {}}
/>
);
}Variants and states
Every specimen is the real component from src/ui, held in one state.
Rp150.000
Rp150.000
Rp150.000
Rp150.000
Valid for 04:59
Rp150.000
Valid for 04:59
Rp150.000
Valid for 04:59
Pastes as editable layers. Shadows are not exported.
Props
- qr
- ReactNode · default none
- The real QR from the backend. Leave out only in documentation.
- label
- string · default none
- Merchant or account.
- value
- string · default none
- Formatted amount.
- expiry
- string · default none
- Dynamic only. The countdown text.
- type
- "static" | "dynamic" · default "static"
- size
- "sm" | "md" | "lg" · default "md"
- QR 160, 200, 240.
- onSave, saveLabel
- () => void, string · default none
- Shows the save button.
Figma to code
Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.
- 🧰 Type
- type
- static or dynamic.
- 📐 Size
- size
- sm, md, or lg.
- Show Label, Label
- label
- Same.
- Show Value, Value
- value
- Same.
- Show Button, Button Value
- onSave, saveLabel
- Pass to show.
Accessibility
What the code in src/ui does today, and what it leaves to you.
Keyboard
- Only the save button is focusable.
Screen readers
- The QR is an image named Payment QR code for the merchant.
What you still need to do
- The placeholder pattern is illustrative and not scannable. Always render the real QR from the backend.
- Do not announce the countdown every second.
When to use
QRIS payments, check-in, and sharing an account.
Do and don't
Do
- Keep a quiet zone around the code and a white background.
- Show who is being paid next to the code.
Don't
- Place the code on a colored or dark background.
- Crop or stretch the code to fit a layout.
Related
4 of 28 other molecules, same role and ready ones first.
- AccordionStacked sections that expand to reveal their content.Ready
- CardA container that groups related content and actions.Ready
- DividerA thin line used to separate content into distinct sections.Ready
- Empty StateCommunicates that there is no content to show, with a next step.Ready
Status reflects the component tracker snapshot of 29 October 2026.