Skip to content

Bitcoin QR Display

import '@sbddesign/bui-ui/bitcoin-qr-display.js'
<bui-bitcoin-qr-display
address="BC1QYLH3U67J673H6Y6ALV70M0PL2YZ53TZHVXGG7U"
lightning="lnbc10u1pn9eh8vpp5k7q2dz6c4w0d3p0d8n2k3z6a7n8r7c9e9e0t8s8y5j6lm3vwm3dqzsdz5xysxxmmnwssx7un9de6xzetjv4kxzcm9d5c8g6t5de5k2mr0d5c8g6t5de5k2mr0da5gzqzjccqzpgxqyz5vqsp5usyc4lk9chsfp53kvcnvq456ganh60d89reykdngsmtj6yw3nhvq9qyysgqc8u6w"
selector="toggle"
></bui-bitcoin-qr-display>
PropertyAttributeTypeRequiredReflectedDescription
addressaddressstringNoNoBitcoin on-chain address
lightninglightningstringNoNoLightning network invoice
optionoptionstringNoYesQR option to display: “unified”, “lightning”, “onchain”
selectorselectorstringNoYesSelector type: “dots”, “toggle”
sizesizenumberNoNoQR code size in pixels
showImageshow-imagebooleanNoYesWhether to show an image overlay on the QR code
dotTypedot-typestringNoYesStyle of dots in the QR code
dotColordot-colorstringNoYesColor of dots in the QR code
unifiedImageunified-imagestringNoNoImage URL for unified QR code
lightningImagelightning-imagestringNoNoImage URL for lightning QR code
onchainImageonchain-imagestringNoNoImage URL for on-chain QR code
copyOnTapcopy-on-tapbooleanNoYesWhether to copy QR data when tapped
placeholderplaceholderbooleanNoYesWhether to show placeholder state
errorerrorbooleanNoYesWhether to show error state
errorMessageerror-messagestringNoNoError message to display
completecompletebooleanNoYesWhether the payment is complete
  • unified - BIP21 URI with both address and lightning
  • lightning - Lightning network invoice only
  • onchain - Bitcoin address only
  • dots - Dot-based selector for switching between options
  • toggle - Toggle button for switching between options
  • Automatic Detection: If both address and lightning are provided, the component automatically enables the unified option
  • Selector Display: The selector only appears when multiple options are available
  • QR Generation: QR codes are generated dynamically based on the selected option
  • Image Overlay: Custom images can be overlaid on QR codes for branding
  • Copy Functionality: When copyOnTap is enabled, tapping the QR code copies the relevant data

The component emits a click event when the QR code is tapped (if copyOnTap is enabled).