# shadcn/ui registry (Developers)

URL: https://qrdx.dev/docs/developers/shadcn
Source: https://github.com/qrdxinc/qrdx/blob/main/apps/docs/content/docs/developers/shadcn.mdx

Eight QR code components for shadcn/ui projects, built on the qrdx library. Install one with the shadcn CLI and own the code.

QRdx publishes a shadcn/ui registry of QR code components built on the `qrdx` library. The shadcn CLI copies each component's source into your project, so you own the code and can change it. Use the registry when you want a finished piece of UI, with download buttons, a card, a share dialog or a scanner; use the library's own `QRCode` when you only need the code.

> This page describes qrdx 0.0.65. Run `npm view qrdx version` to see the version npm installs.

```bash
npx shadcn@latest add @qrdx/qr-code
```

Or by URL, which works with older versions of the CLI too:

```bash
npx shadcn@latest add https://qrdx.dev/r/qr-code.json
```

Each component has its own page with a live preview, the source, installation steps, examples and a props table. Styled a code in the [playground](https://qrdx.dev/playground?open=code&lang=shadcn)? Copy it there for the registry's QR Code component.

## Components [#components]

- [QR Code](https://qrdx.dev/docs/components/qr-code): A styled, accessible QR code with download buttons. Colors, gradients, patterns and logos.
- [QR Code Card](https://qrdx.dev/docs/components/qr-code-card): A card with the code in a "Scan me" frame, a title, a description and room for actions.
- [QR Code Download](https://qrdx.dev/docs/components/qr-code-download): A menu that exports PNG, SVG, JPG or PDF at the size you pick, or copies the image.
- [QR Code Share Dialog](https://qrdx.dev/docs/components/qr-code-share-dialog): A dialog with the code for a link, a copy button, a PNG download and the native share sheet.
- [QR Code Generator](https://qrdx.dev/docs/components/qr-code-generator): A text input with a live preview, style presets and download buttons.
- [QR Code Scanner](https://qrdx.dev/docs/components/qr-code-scanner): A drop zone that reads a QR code from an image in the browser.
- [Wi-Fi QR Code](https://qrdx.dev/docs/components/wifi-qr-code): A code that joins a Wi-Fi network, with an escaped payload builder.
- [vCard QR Code](https://qrdx.dev/docs/components/vcard-qr-code): A code that saves a contact card, with a vCard 3.0 builder.

## What gets installed [#what-gets-installed]

Each component is a single file in your `components` folder. The CLI also installs `qrdx` (plus `lucide-react` for the icons most of the components use) and adds the shadcn/ui components it builds on, such as `button`, `card`, `dialog`, `dropdown-menu`, `input` or `label`. Each component page lists its own dependencies under **Manual** in the installation tabs.

The full index is at [`https://qrdx.dev/r/registry.json`](https://qrdx.dev/r/registry.json), and each item at `https://qrdx.dev/r/<name>.json`.

## The @qrdx namespace [#the-qrdx-namespace]

QRdx is listed in the [shadcn/ui registry directory](https://ui.shadcn.com/docs/directory), so `@qrdx/<name>` works with no setup: you don't add anything to `components.json` first. It needs version 3.7.0 or later of the shadcn CLI, which `npx shadcn@latest` always fetches.

Add several components at once:

```bash
npx shadcn@latest add @qrdx/qr-code @qrdx/qr-code-download @qrdx/qr-code-share-dialog
```

List everything in the registry, or look at an item before you add it:

```bash
npx shadcn@latest search @qrdx
```

```bash
npx shadcn@latest view @qrdx/qr-code
```

### By URL, or with an older CLI [#by-url-or-with-an-older-cli]

The full URL, `https://qrdx.dev/r/<name>.json`, doesn't go through the directory, so it also works with versions of the CLI before 3.7.0, which can't read the directory and don't know `@qrdx`. To use the short names on versions 3.0 to 3.6, add the registry to your `components.json` (versions before 3.0 have no namespaces, so use the URL there):

```json title="components.json"
{
  "registries": {
    "@qrdx": "https://qrdx.dev/r/{name}.json"
  }
}
```

## Styling and theming [#styling-and-theming]

The components use Tailwind classes with the standard shadcn/ui theme tokens (`bg-card`, `border`, `text-muted-foreground`, `ring-ring`) and your own Button, Card, Dialog and Input, so they follow your theme and dark mode. QR codes keep a light background by default, because dark modules on a light tile scan with every reader; the [QR Code](https://qrdx.dev/docs/components/qr-code#dark-mode) page shows how to follow the theme instead.

Every component is a Client Component (its file starts with `"use client"`), because of its buttons and state. The code itself is still rendered on the server, so it is in the page's HTML before the buttons become interactive. A Server Component page can import any of them and pass server data as props.

PDF downloads need the optional `jspdf` package (`npm install jspdf`). Everything else works after the CLI finishes.

## Related [#related]

- [QR Code](https://qrdx.dev/docs/components/qr-code): The component most projects start with.
- [QR codes in Next.js](https://qrdx.dev/docs/nextjs): The library on its own in the App Router, without the registry.
- [Get started with the React library](https://qrdx.dev/docs/getting-started): Install qrdx and render a code without shadcn/ui.
