New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

solid-qr

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solid-qr

A minimal QR code image generator for SolidJS

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

solid-qr

Solid QR

A minimal QR code image generator for SolidJS using node-qrcode



Installation

Yarn

yarn add solid-qr

PNPM

pnpm add solid-qr

NPM

npm i solid-qr

Usage

import SolidQR from "solid-qr"
// or
import { SolidQR } from "solid-qr"

const Example = () => {
  return <SolidQR text="Hello World"/>
}

Configuration

The solid-qr component receives the same props as a regular img would, plus two custom ones used to generate the QR code.

  1. text: A string used to generate the QR Code.
  2. options: An object with the following structure
KeyTypeDefaultDescription
versionnumberQR Code version ranging from 1 to 40. If not specified the more suitable value will be calculated.
errorCorrectionLevellow | medium | quartile | highmediumQR Code error correction level
maskPattern1 | 2 | 3 | 4 | 5 | 6 | 7Mask pattern used to mask the symbol. If not specified the more suitable value will be calculated.
marginnumber2Define how much wide the quiet zone should be.
scalenumber4Scale factor. A value of 1 means 1px per modules (black dots).
widthnumber512Forces a specific width for the output image.If width is too small to contain the qr symbol, this option will be ignored.Takes precedence over scale.
color.darkstring#000000ffColor of dark module. Value must be in hex format (RGBA).
color.lightstring#ffffffffColor of light module. Value must be in hex format (RGBA).

Keywords

FAQs

Package last updated on 19 Feb 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc