# QR Code

Unicode block QR code generator



<ComponentPreview base="ink" name="qr-code-demo" />

Installation [#installation]

<CodeTabs>
  <TabsList>
    <TabsTrigger value="cli">
      Command
    </TabsTrigger>

    <TabsTrigger value="manual">
      Manual
    </TabsTrigger>
  </TabsList>

  <TabsContent value="cli">
    ```bash
    npx shadcn@latest add @termcn/qr-code
    ```
  </TabsContent>

  <TabsContent value="manual">
    <Steps>
      <Step>
        Copy and paste the following code into your project.
      </Step>

      <ComponentSource base="ink" name="qr-code" title="components/ui/qr-code.tsx" />

      <Step>
        Update the import paths to match your project setup.
      </Step>
    </Steps>
  </TabsContent>
</CodeTabs>

Usage [#usage]

```tsx
import { QRCode } from "@/components/ui/qr-code";
```

```tsx
<QRCode value="https://termcn.dev" size="md" label="Scan to visit" />
```

API Reference [#api-reference]

QRCode [#qrcode]

| Prop    | Type                   | Default    |
| ------- | ---------------------- | ---------- |
| `value` | `string`               | `required` |
| `size`  | `"sm" \| "md" \| "lg"` | `"md"`     |
| `color` | `string`               | -          |
| `label` | `string`               | -          |
