# @ttsalpha/qrcode
> Lightweight QR code library for React and React Native: pure SVG, zero dependencies, fully typed. Covers SSR, custom dot/corner shapes, logo embedding, and PNG/SVG export. Version 3.1.0. MIT license.
Requires React 18+ as peer dependency. React Native also needs `react-native-svg` (optional peer).
Install: `pnpm add @ttsalpha/qrcode`
Quick start:
```tsx
import { QRCode } from '@ttsalpha/qrcode';
export default function App() {
return ;
}
```
Entry points:
| Import from | Contents | Needs at runtime |
|---|---|---|
| `@ttsalpha/qrcode` | ``, `toSVGString`, `toDataURL` | React 18+ |
| `@ttsalpha/qrcode/server` | `toSVGString`, `toDataURL`; no client boundary, for React Server Components | nothing (`toDataURL` needs a browser) |
| `@ttsalpha/qrcode/native` | `` for React Native and Expo | React 18+, `react-native-svg` |
| `@ttsalpha/qrcode/core` | `buildQR`, `toSVGString`; no React, no DOM | nothing |
**QRCodeProps**
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | — | Data to encode (required) |
| size | number | 256 | Width and height in pixels |
| margin | number | 4 | Quiet zone in modules |
| dotStyle | DotStyle | 'square' | Style of data modules |
| dotColor | string | '#000000' | Color of data modules |
| backgroundColor | string | '#ffffff' | Background color; 'transparent' accepted |
| corner | CornerOptions | — | Finder pattern styles and colors |
| logo | LogoOptions | — | Logo in center |
| qr | QROptions | — | QR encoding options |
| className | string | — | CSS class on `