Props
| Prop | Type | Default |
|---|---|---|
| value What the code encodes: a URL, a payment link, a ticket id. | string | — |
| label Text on the pill. | string | labels.showQrCode |
| copyLabel Copy button text. | string | labels.copy |
| copiedLabel Shown after Copy is pressed. | string | labels.copied |
| closeLabel Screen-reader name of the card's close button. Set it app-wide with KitProvider's labels. | string | labels.close |
| onCopy Wire your clipboard here (expo-clipboard). | (value: string) => void | — |
| open Controlled state. | boolean | — |
| defaultOpen Uncontrolled initial state. | boolean | false |
| onOpenChange Opened or closed. | (open: boolean) => void | — |
| size Pill height 36 / 44 / 52. | "sm" | "md" | "lg" | "md" |
| codeSize Side of the code in points; the card wraps it. | number | 168 |
| color Pill colour. The card stays white so the code scans. | string | white (dark) / primary (light) |
| accessibilityLabel Screen reader label for the pill. | string | label |
| style Root style. | StyleProp<ViewStyle> | — |
| className Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. | string | — |
Customization
You own the source file — tune appearance with props (no fork required for most tweaks). For brand-wide colours and radius, wrap your app in KitProvider; for one-off looks, use the style props below.
Design theme
Open Design theme on the live preview — accent, corner radius and font update every variant instantly (same as KitProvider in your app).
Variants
Use the variant chips on the preview to switch examples; each maps to a demo you can copy from the Code tab.
Style props
React Native style and typed slots like fieldStyle, plus optional root className when you use NativeWind or Uniwind (cnProps from kit).
- size
- "sm" | "md" | "lg" · default "md"Pill height 36 / 44 / 52.
- color
- string · default white (dark) / primary (light)Pill colour. The card stays white so the code scans.
- style
- StyleProp<ViewStyle>Root style.
- className
- stringTailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides.
Map tokens from your design system on Bring your design system or read Theming for KitProvider and NativeWind / Uniwind setup.
Behaviour & accessibility
- Motion
- Press swells the pill; it glides into the card while its label fades out and the code fades and scales in. Close glides it back.
- Layout
- Reserves the open card's size up front, so nothing around it moves and every control stays inside its own bounds (taps work on Android).
- Code
- Encoded in the component: UTF-8 bytes, error correction M, smallest version that fits, mask chosen by the spec's penalty rules. Always dark on white so it scans in dark mode too.
- Copy
- Calls onCopy with the value and flips to a tick and "Copied" for 1.5 s.
- Haptics
- A light impact on open, a success tap on Copy, a tick on close.
- Reduced motion
- Opens and closes with a short fade.
- Screen readers
- A button with an expanded state; the code reads as "QR code for …".
Source
FAQ
How do I make a QR code generator in React Native?
Does QR Code Button work in Expo Go?
react-native-svg, expo-haptics) are all included in Expo Go.How do I add QR Code Button to my Expo app?
react-native-svg, expo-haptics, so the code is yours to change. The install command is on this page for Pro members.Is QR Code Button free?
npx @expokit/cli@latest login) and it installs the full source into your app.Can I change how QR Code Button looks?
useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.