# QR Code
> Renders a QR code as inline SVG.
Source: https://shellui.dev/docs/v0.4/components/data-display/qr-code
`QrCode` is **new in v0.4**. It encodes any text or URL into a QR code drawn as SVG, so it stays sharp at any size and needs no JavaScript.
## Installation
```bash
shellui add qr-code
```
The CLI also adds the [`QRCoder`](https://www.nuget.org/packages/QRCoder) NuGet package to your project. The `ShellUI.Components` package already references it.
## Usage
### Basic
```razor
```
### Sizes
`Size` is the width and height in pixels.
```razor
```
### Colours
`Foreground` and `Background` take any CSS colour. Keep the contrast high, or scanners will struggle.
```razor
```
### Live value
The code redraws when `Value` changes. A higher `ErrorCorrection` level survives more damage but makes a denser code.
```razor
@code {
private string text = "https://shellui.dev";
}
```
## API Reference
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `Value` | `string` | `""` | The text or URL to encode |
| `Size` | `int` | `160` | Width and height in pixels |
| `ErrorCorrection` | `string` | `"M"` | `L` (7%), `M` (15%), `Q` (25%) or `H` (30%) |
| `Foreground` | `string` | `"#000000"` | Colour of the modules |
| `Background` | `string` | `"#ffffff"` | Colour behind them |
| `Label` | `string?` | `null` | Accessible name; defaults to `Value` |
| `Class` | `string?` | `null` | Additional CSS classes |
## Accessibility
- Renders with `role="img"` and an `aria-label` (`Label`, or the encoded value)
- A QR code can't be used without a camera, so show the link or text next to it as well