QRCode
Generates a QR code locally and downloads SVG or PNG. No network service is used.
Live TypeScript example
Try the component here, then use the source below in your application.
- JavaScript
- 10.9 KiB
- Component CSS
- 0.8 KiB
- Shared theme CSS
- 3.8 KiBonce per application
How sizes are measured
The JavaScript figure includes this component’s required helpers. CSS includes its styling dependencies. Each entry is bundled separately for ES2022, minified, then compressed with gzip level 9. Your bundler may share helpers across components. Images, fonts, examples and application code are excluded.
Before compression: JavaScript 28.4 KiB; component CSS 2.2 KiB. These figures describe browser assets, not the complete package download.
View all component measurements →Interact with the QRCode example. The code below shows its actual inputs and callbacks.
import '@blukavantui/web/theme.css'
import {createQRCode} from '@blukavantui/web/qr-code';
import '@blukavantui/web/qr-code.css';
export function mount(host: HTMLElement) {
return createQRCode(host, {
"Value": "https://blukavantui.blutekmedia.com",
"Size": 192,
"Status": "Active",
"ErrorCorrection": "M",
"ShowDownload": true
});
}
const instance = mount(document.getElementById('example')!)
// When this page or framework component is removed:
// instance.destroy()
Install the library and add the host element
npm install https://blukavantui.blutekmedia.com/downloads/blukavantui-web-0.6.2.tgz<div id="example"></div>This example uses the downloadable @blukavantui/web package. Your application handles persistence and authentication through its typed callbacks. The starter ZIP includes this same example.
createQRCode
Pass options as the second argument and callbacks in the third argument. Keep the returned instance to update options or dispose it when its view is removed.
import { createQRCode } from '@blukavantui/web/qr-code';
import '@blukavantui/web/qr-code.css';Load @blukavantui/web/theme.css once in your app shell.createQRCode(host: HTMLElement, options: T.QRCodeOptions, events?: T.QRCodeEvents)Reference for @blukavantui/web 0.6.2. Required and optional follow the shipped TypeScript declarations; optional does not imply a particular default. Pass typed arrays and objects directly where shown.
Options
8| Name | Type / requirement | Usage |
|---|---|---|
Value | stringOptional | Text or URL to encode. Empty displays an empty state. |
Size | numberOptional | Code size including quiet zone, in CSS pixels (96–512). |
ErrorCorrection | stringOptional | L, M, Q or H error correction. |
Status | stringOptional | Active, Loading or Expired. |
ShowDownload | booleanOptional | Displays SVG and PNG download controls when active. |
FileName | stringOptional | Safe base filename for downloads. |
AccessibleLabel | stringOptional | Accessible image label. Do not expose secret data in this caption. |
ExtendedClass | stringOptional | Additional CSS classes on the component root. |
Callbacks
2| Name | Type / requirement | Usage |
|---|---|---|
Refresh | (key: string) => unknownOptional | |
Error | (message: string) => unknownOptional |
Instance methods & properties
3| Name | Signature / type | Usage |
|---|---|---|
element | HTMLElement | Root owned by this instance. Dispose before removing its host. |
update | (patch: Partial<T.QRCodeOptions>) => void | Apply a partial options update to this instance. |
destroy | () => void | Dispose the instance and its listeners when the view is removed. |
Use these inputs, events, actions and structures in Service Studio. Names and data bindings are specific to the native Blocks.
Part of the full commercial BluKavantUI for OutSystems edition. View OutSystems editions →
Open OutSystems showcase ↗- Web runtime
- Supported
- TypeScript
- Supported
- OutSystems
- Supported
Statuses describe the component’s rendered code and interactions. Supply accessible content and follow the component guidance when integrating it.
Accessibility guidance →Purpose and use
Generates a QR code locally and downloads SVG or PNG. No network service is used.
Keyboard design guidance
The image has an accessible label. Download and refresh controls are keyboard accessible.
See the support status above for review coverage and any limitations.
In your application
Provide useful labels, preserve visible focus, and test the component with your actual content. Use text alongside status colors and check contrast in each state.
Events0No events yet.
Interact with an example to see its events.