2.5.6 • Published 2 years ago
react-qrious v2.5.6
ReactQrious
🤳 A React component for QR code generation with qrious
Demo
Usage
// Component
import ReactDOM from 'react-dom'
import { QRious } from 'react-qrious'
ReactDOM.render(
<QRious value="https://www.1stg.me" />,
document.getElementById('qrious'),
)
// hooks
import { useQrious } from 'react-qrious'
export const App = () => {
const [value, setValue] = useState('https://www.1stg.me')
const [dataUrl, _qrious] = useQrious({ value })
return (
<>
<div>dataUrl: {dataUrl}</div>
<img src={dataUrl} />
<input onChange={e => setValue(e.currentTarget.value)} />
</>
)
}
Available Props
prop | type | default value |
---|---|---|
background | string (CSS color) | "#ffffff" |
backgroundAlpha | number (0.1-1.0) | 1.0 |
foreground | string (CSS color) | "#000000" |
foregroundAlpha | number (0.1-1.0) | 1.0 |
level | string ("L", "M", "Q", "H") | "L" |
mime | string ("image/png", "image/jpeg") | "image/png" |
padding | number | null |
size | number | 100 |
value | string |
Sponsors
1stG | RxTS | UnTS |
---|---|---|
Backers
1stG | RxTS | UnTS |
---|---|---|
Changelog
Detailed changes for each release are documented in CHANGELOG.md.
License
2.5.6
2 years ago
2.5.4
2 years ago
2.5.3
2 years ago
2.5.5
2 years ago
2.5.2
2 years ago
2.5.1
2 years ago
2.5.0
3 years ago
2.4.5
4 years ago
2.4.4
4 years ago
2.4.3
4 years ago
2.4.1
4 years ago
2.4.2
4 years ago
2.4.0
5 years ago
2.3.2
5 years ago
2.3.1
5 years ago
2.3.0
5 years ago
2.2.1
5 years ago
2.2.0
5 years ago
2.1.0
5 years ago
1.0.5
6 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago
0.1.0
7 years ago
0.0.1
7 years ago