You can set default options within your nuxt.config.ts.
Qrcode and useQrcodeYou can customize things like:
0 is none, 1 is full)export default defineNuxtConfig({
modules: ['nuxt-qrcode'],
qrcode: {
options: {
variant: 'pixelated',
// OR
variant: {
inner: 'circle',
marker: 'rounded',
pixel: 'rounded',
},
radius: 1,
blackColor: 'currentColor',
whiteColor: 'transparent',
},
},
})
In case you have installed Nuxt UI or UI-Pro this module will automatically use configured colors to color the generated QRCodes.
You only need to make sure to register nuxt-qrcode after Nuxt UI:
export default defineNuxtConfig({
modules: [
'@nuxt/ui', // or `@nuxt/ui-pro`
'nuxt-qrcode',
],
})
export default defineNuxtConfig({
// ...
qrcode: {
options: {
disableNuxtUiIntegration: true,
},
},
})