
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
react-native-qr-svg
Advanced tools
A QR Code generator for React Native based on react-native-svg. Effortlessly create QR codes with a style reminiscent of modern designs.
Start by installing the necessary packages:
yarn add react-native-svg react-native-qr-svg
This library provides a straightforward way to generate QR codes within React Native applications. The QR codes produced have a modern aesthetic, perfect for various design contexts.
This library allows for easy customization of QR codes, enabling developers to adjust dot color, background color, frame size, and content within the code.
Implement QR codes easily in your React Native app:
import React from 'react';
import { StyleSheet, View, Text } from 'react-native';
import { QrCodeSvg } from 'react-native-qr-svg';
export default function App() {
return (
<View style={styles.container}>
<View style={styles.firstQr}>
<QrCodeSvg
value="Hello world!"
frameSize={200}
contentCells={5}
content={
<View>
<Text>👋</Text>
</View>
}
contentStyle={styles.box}
/>
</View>
<View style={styles.secondQr}>
<QrCodeSvg
value="Hello world!"
frameSize={200}
contentCells={5}
content={
<View>
<Text>💻</Text>
</View>
}
dotColor="#ffffff"
backgroundColor="#000000"
contentStyle={styles.box}
/>
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
},
box: {
alignItems: 'center',
justifyContent: 'center',
},
firstQr: {
marginRight: 15,
},
secondQr: {
padding: 15,
backgroundColor: '#000000',
},
});
Want to contribute? Check out the contributing guide to learn how you can be a part of this project's development.
This project is licensed under the MIT License.
Made with create-react-native-library
FAQs
Generate attractive QR codes for your React Native projects, compatible with Android, iOS, and web platforms.
The npm package react-native-qr-svg receives a total of 1,200 weekly downloads. As such, react-native-qr-svg popularity was classified as popular.
We found that react-native-qr-svg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.