ClickorKeyboard shortcut Alt + L

Dragto resize

Nord Design System SearchDeveloperDeveloperGetting startedUsing Web ComponentsWebfontsCDNLocalizationCSS Framework Legacy ESLint PluginWorking with AIFAQDesignDesignGetting startedFoundationsAccessibilityColor SystemColor UtilitiesPrinciplesFigma ToolkitGridIconographyNamingNordhealth BrandTypographyThemesBrand assetsToolsComponentsComponentsAccordion New Aside New Autocomplete New AvatarBadgeBannerButtonButton GroupCalendarCard Updated CheckboxCollapsible New Combobox New Command MenuDate PickerDate Range Picker New DividerDrawer Updated DropdownEmpty StateField New FieldsetFilter Add ButtonFilter DateFilter Date RangeFilter DropdownFilter FieldFilter InputFilter Reset ButtonFooterHeaderIconInputInput Group New Item New Kbd New LayoutMessageMeter New Modal Updated NavigationNotificationNumber Field New Otp Field New Outline New Overflow List New Pagination New PopoutProgressProgress BarQrcodeRadioRangeResizable New Scroll Area New Segmented ControlSelectSkeletonSpinnerStackTabTableTagTextareaTime Picker New Timestamp New ToastToggleTooltipTop BarTruncate New Visually HiddenDesign TokensDesign TokensTailwind CSSTailwind CSSBlocksBlocksTemplatesTemplatesIconsIconsPlaygroundPlaygroundLatest UpdatesLatest UpdatesChangelogChangelogMigration guidesMigration guides
GitHub

Clickto expandKeyboard shortcut Alt + L

QR Code

Open in Storybook

Renders a scannable QR code for a URL or text value.

Loading...

Usage

QR Code renders a scannable code for a value (a URL or text). Provide a label for the accessible name.

import "@nordhealth/components/lib/Qrcode"

Examples

Basic

A plain QR code from a value, with no label or styling overrides.

Colour

Override the foreground color and background to match your surface (keep enough contrast to stay scannable).

Error correction

Higher correction levels (L, M, Q, H) stay scannable with more damage or overlay, at the cost of density.

Size

Set an explicit size (in pixels) when you need a specific dimension.

Accessibility

  • Provide a label describing what the code links to, so it has an accessible name.
  • Keep strong contrast between color and background; low-contrast codes may fail to scan and are hard to see.
  • Pair the code with a visible text link or instructions where possible, so people who can't scan it still have a path.

API reference

Qrcode

QR Code component is used for providing information or links to users which they can quickly scan with their smartphone.

<nord-qrcode></nord-qrcode>

Props

PropertyAttribute Description TypeDefault
valuevalueThe value of the QR Code, most commonly an URL.string''
labellabelLabel used by assistive technology. If unspecified, the value will be used instead.string''
sizesizeThe size of the rendered QR Code in pixels.number128
colorcolorThe fill color of the QR Code. Can accept any valid CSS color value, including custom properties.string'var(--n-color-text)'
backgroundbackgroundThe background color of the QR Code. Can accept any valid CSS color value, including custom properties.string'var(--n-color-surface)'
correctioncorrectionError correction level makes the QR Code bigger and helps users to scan it without issues. L, M, Q and H values will use 7%, 15%, 25% and 30% of the QR code for error correction respectively.'L' | 'M' | 'Q' | 'H''H'
Design guidelinesFor designers

Usage

This section includes guidelines for designers and developers about the usage of this component in different contexts.

Do

  • Use to allow people to access information on their smartphone without the need to type.
  • Always provide an alternative way to access the same information.

Don’t

  • Don’t hide important information behind a QR Code only.