StellarUI

<stellar-qr>

Canvas-backed QR code generator for URLs, email addresses, and other short text payloads.

Properties

Preview

Set radius="0" for square modules and move toward 1 for the fully rounded fully rounded look.

Markup

Copy
<stellar-qr
  data="https://stellarui.com"
  radius="0"
  size="128"
>
</stellar-qr>

API

Complete props, events, slots, and implementation notes for the shipped QR component.

Props

PropTypeDefaultNotes
datastringhttps://stellarui.com
labelstring''
error-correctionL | M | Q | HL
radiusnumber0
sizenumber128

Events

EventSourceNotes
custom eventsnonestellar-qr redraws when props change but does not emit interaction events.

Slots

SlotNotes
noneThis component has no slots. It renders one internal <canvas> element and is fully prop-driven.

Notes

  • The public tag is `stellar-qr`, and it keeps a small surface: `data`, `label`, `error-correction`, `radius`, and `size`.
  • The component renders to an internal canvas and redraws when the encoded data, correction level, radius, size, or effective text color changes.
  • `label` is assistive-only; when it is unset, the component falls back to the raw `data` string for `aria-label`.
  • `radius` runs from `0` to `1` on the public API, then maps to the QR library's internal `0..0.5` range; `size` is in CSS pixels, and the background stays transparent so outer surfaces can supply framing or color.