Data display
QR code
A QR code a phone scans: an authenticator's set-up, a link to open on another device.
Installation
pnpm add @elsikora/keystone-ui-kitUsage
import { QrCode } from "@elsikora/keystone-ui-kit";import { QrCode } from "@elsikora/keystone-ui-kit";
export default function QrCodeDefaultExample() { return <QrCode text="https://keystone.example/docs" label="Open the docs on your phone" />;}Examples
Default
With its text
The same content as text beside the code, for a person who cannot scan it.
JBSWY3DPEHPK3PXPAPI reference
QrCode
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | - | What the code holds: a link, an otpauth:// address. |
label | string | - | The image's accessible name. |
size | number | 192 | Width and height in CSS pixels. |
Notes
- It is an image named by label: say what scanning it does, not the text it holds.
- Always give the text another way too (as the authenticator's key beside the code).
- Dark on light in both themes, with the standard quiet zone of four modules drawn in.