Socket
Book a DemoInstallSign in
Socket

strapi-plugin-qr-code

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strapi-plugin-qr-code

A Strapi plugin to display generated QR Codes on the admin panel's ContentTypes.

latest
Source
npmnpm
Version
0.4.3
Version published
Maintainers
1
Created
Source
Logo - Strapi Plugin QR Code

Strapi v5 - Plugin QR Code

Strapi Plugin to easily show QR Codes

GitHub package.json version Monthly download on NPM
UI preview

A plugin for Strapi Headless CMS that provides an easy way to show QR Codes in Strapi entities.

Features

  • Show QR Code to strapi entities on update form. This QR Code leads to computed text.

Usage

To configure the QR Code plugin, add your configuration to the plugin settings. The configuration consist of an array of contentTypes with their own computeValue function:

type Config = {
  contentTypes: Array<{
    uid: UID.ContentType
    populate?: Array<string> | '*'
    computeValue: (
      uid: UID.ContentType, 
      status: 'draft' | 'published', 
      document: Modules.Documents.Document<UID.ContentType>
    ): string | Promise<string>;
  }>,
};

This configuration allows you to define a computeValue for content-types associated. The plugin try to fetch the concerned entity and pass it to computeValue function in document parameters. The string output of the function is what is used to generate the QR Code.

Example Configuration

// config/plugins.ts
import type { Config as QRCodeConfig } from 'strapi-plugin-qr-code/dist/server/src/config'

export default () => ({
  'qr-code': {
    enabled: true,
    config: {
      contentTypes: [
        {
          uid: 'api::content.content',
          computeValue: (uid, status, document) => {
            return `/${uid.split('.')[1]}?status=${status}&documentId=${document.documentId}`
          },
        },
        {
          uid: 'api::category.category',
          computeValue: (uid, status, document) => {
            return `My category is: ${document.name} - status: ${status} - edited: ${document.updatedDate}`
          },
        },
      ],
    } satisfies QRCodeConfig,
  }
})

Keywords

strapi

FAQs

Package last updated on 13 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.