Skip to main content

QRCode

Encode text or a URL as a QR code.

QRCode in a native Kindle example

Usage​

Save this example as apps/Reader/App.js in the starter app.

import React from 'react';
import {QRCode, View} from 'react-kindle';

export default function App() {
return (
<View style={{padding: 24}}>
<QRCode value="https://example.com/library" size={180} />
</View>
);
}

Props​

PropType / defaultDescription
valuestringText to encode.
sizepositive number = 132Requested size.
marginnonnegative number = 4Code margin.
onResize(size: number) => voidNative size result.
onError(error: Error) => voidReports a value too long to encode.
styleView styleLayout overrides.