npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kakarot2905/quizzie-module

v0.1.1

Published

Quizzie embeddable quiz module as a Web Component

Readme

Quizzie Module

Embeddable Quizzie module distributed as a Web Component.

Install

npm install @kakarot2905/quizzie-module

Usage in any web app

Render directly in plain HTML with an ES module script:

<div id="quiz-root"></div>
<script type="module">
  import { loadQuizzieModule, elementTag } from "@kakarot2905/quizzie-module";

  await loadQuizzieModule();

  const host = document.getElementById("quiz-root");
  host.innerHTML = `<${elementTag}></${elementTag}>`;
</script>

Usage in React

  1. Install the package:
npm install @kakarot2905/quizzie-module
  1. Load and render the custom element in a React component:
import { useEffect, useRef } from "react";
import { loadQuizzieModule, elementTag } from "@kakarot2905/quizzie-module";

export default function QuizzieEmbed() {
  const hostRef = useRef(null);

  useEffect(() => {
    (async () => {
      await loadQuizzieModule();
      const host = hostRef.current;
      if (!host) return;

      const quizElement = document.createElement(elementTag);
      host.replaceChildren(quizElement);
    })();
  }, []);

  return <div ref={hostRef} />;
}
  1. (Optional) If your React app is TypeScript, add this to avoid JSX type errors for custom elements:
// src/custom-elements.d.ts
import type React from "react";

declare namespace JSX {
  interface IntrinsicElements {
    "quizzie-module": React.DetailedHTMLProps<
      React.HTMLAttributes<HTMLElement>,
      HTMLElement
    >;
  }
}

Then you can render it directly:

import { useEffect } from "react";
import { loadQuizzieModule } from "@kakarot2905/quizzie-module";

export default function QuizzieEmbed() {
  useEffect(() => {
    loadQuizzieModule();
  }, []);

  return <quizzie-module />;
}

Using local build in a React demo app

If you are testing locally before publishing:

From frontend in this repository:

npm run prepare:npm-lib

From your React/Vite demo app:

npm install "C:/Users/sudha/Desktop/Myself/programing/git/Quizzie/frontend/dist/npm-lib"

Optional: Load from CDN

<script type="module">
  import { loadQuizzieModule, elementTag } from "https://unpkg.com/@kakarot2905/quizzie-module/loader.js";

  await loadQuizzieModule();
  document.body.innerHTML += `<${elementTag}></${elementTag}>`;
</script>

Build and pack locally

From the frontend project root:

npm run pack:npm-lib

This creates a .tgz package in the current directory.

Publish

  1. Update package name and version in npm-lib/package.json.
  2. Login to npm: npm login.
  3. Publish:
npm run publish:npm-lib