QRCode
QR code generator using Canvas 2D API
Accessibility
- Treat the component as presentational unless it exposes interactive affordances, and label any interactive affordances explicitly.
- Keep heading, reading, and focus order aligned with the surrounding content.
Styled quick start
Copy this entrypoint first. It includes the imports required to get the component on screen.
svelte
<script lang="ts">
import '@dryui/ui/themes/default.css';
import '@dryui/ui/themes/dark.css';
import { QRCode } from '@dryui/ui';
</script>
<QRCode value="https://dryui.dev" size={160} errorCorrection="M" /> Import options
Root package
ts
import { QRCode } from '@dryui/ui' Per-component subpath
ts
import { QRCode } from '@dryui/ui/qr-code' API
Props, CSS variables, and the public data attributes you can target when styling.
| Prop | Type | Description | Default | Required | Bindable |
|---|---|---|---|---|---|
| value | string | Current controlled or bindable value. | — | ✓ | — |
| size | number | Size preset affecting density, spacing, or typography. | 200 | — | — |
| errorCorrection | LMQH | — | 'M' | — | — |
| fgColor | string | — | — | — | — |
| bgColor | string | — | — | — | — |