# `Keyfob.QR`
[🔗](https://github.com/alexdont/keyfob/blob/v0.1.0/lib/keyfob/qr.ex#L1)

Renders a string as an inline SVG QR code via `eqrcode`.

Inline SVG means no `<img>` round-trip and no JS — the QR is part of the
LiveView diff, so rotating it (new token) is a normal re-render.

# `svg`

```elixir
@spec svg(
  String.t(),
  keyword()
) :: String.t()
```

Returns an SVG string encoding `data`.

Options:

  * `:size` — the SVG's pixel width/height (default `240`)
  * `:background` — background color (default `"#ffffff"`)
  * `:color` — module color (default `"#000000"`)

The SVG carries `role="img"` and the given `:title` (default
`"QR code"`) for accessibility.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
