Skip to content
darkblock-logo
Darkblock Docs
  • Pages
    • What is Darkblock?
      • How does it work?
        • Creating a darkblock
        • Viewing Darkblock content
      • The Darkblock Protocol
      • Supported Blockchains
      • HIDEME Sample NFT with Darkblocks
    • For Creators
    • Products
      • The Darkblock API
      • The Darkblock Viewer
      • The Upgrader
      • The Darkblock Web App
      • The Darkblock TV App
    • Features
      • NFT Upgrades
      • Collection Upgrades
      • Content Stacking
      • Editing Metadata
      • Send to Kindle
    • Use Cases
      • Comics and Books
      • Movies
      • Content Creation
      • PFPs
      • Gamified Experiences
    • Developer Integration
      • Getting Started
      • The Darkblock API Overview
        • Get an API Key
      • Embed Darkblocks into any website
        • NPM
          • Ethereum
          • Polygon
          • Solana
          • Tezos
          • Avalanche
          • Customization
      • Direct Integration
      • HIDEME UGC (User Generated Content)
      • Content Monetization
        • Subscriptions using Unlock Protocol
        • Content Rental with Unlock Protocol
    • Help / Support
      • Terminology
      • Help, I made a mistake!
    • Tutorials
      • Unlockable Party Pack
The NPM is used to embed and into any website.
The Darkblock NPM enables you to add unlockable content to any website with ease. The best way to add the Darkblock Viewer to your website is to use one of our chain-specific NPM packages.
We have built out a robust set of NPMs available across 5 different chains.

Shared Components Library

Install Darkblock's React Shared Component Library using yarn or npm
yarn add @darkblock.io/shared-components


npm i @darkblock.io/shared-components --save


Once the library is installed, import or require components into your codebase, i.e:
import {
Header,
Panel,
Player,
Stack,
utils,
widgetMachine
} from "@darkblock.io/shared-components"

Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.