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

studio-keychain

v1.0.3

Published

Interactive 3D vector charm and keyring physics simulation for React and Next.js.

Readme

Studio Keychain

Interactive 3D vector charm and keyring physics simulation for React and Next.js.

Live Demo · npm Package

npm version License: MIT TypeScript


Overview

Studio Keychain parses SVG vector paths and URLs into watertight 3D meshes with real-time rigid-body chain physics, PBR metallic finishes, and studio lighting. It can be embedded as a React component on any background or integrated into design customizers.

Features

  • Vector SVG Extrusion: Converts raw SVG strings, Data URIs, and HTTPS URLs into 3D geometry with bevels and multi-layer enamel faces.
  • Rigid-Body Physics: Cannon.js simulation with multi-joint cone-twist constraints, rotational inertia, and drag/tap pointer interactions.
  • 22+ PBR Finishes: Includes Gold, Silver Chrome, Holographic Foil, Platinum, Titanium, Rose Gold, Damascus, and custom color tints.
  • Transparent Canvas: Supports transparent alpha rendering for placement over cards, modals, or gradient backgrounds.
  • Minimal Loader: Built-in minimal loading spinner with full support for custom loader elements.
  • Responsive Layout: Adapts automatically to parent container boundaries via ResizeObserver.

Installation

# npm
npm install studio-keychain

# pnpm
pnpm add studio-keychain

# yarn
yarn add studio-keychain

# bun
bun add studio-keychain

Quick Start

React / Vite

import { Keychain } from "studio-keychain";

export default function App() {
  return (
    <div style={{ width: "100%", height: "500px", position: "relative" }}>
      <Keychain
        svg="https://svgl.app/library/react.svg"
        finish="Gold"
        style="Shiny"
        transparent={true}
      />
    </div>
  );
}

Next.js (App Router)

WebGL and physics engines require client browser APIs. Use next/dynamic with SSR disabled:

"use client";

import dynamic from "next/dynamic";

const Keychain = dynamic(
  () => import("studio-keychain").then((mod) => mod.Keychain),
  { ssr: false }
);

export default function Page() {
  return (
    <main className="w-screen h-screen">
      <Keychain
        svg="https://svgl.app/library/nextjs.svg"
        finish="Silver"
        style="Shiny"
        transparent={true}
      />
    </main>
  );
}

Dual Charms Setup

import { Keychain } from "studio-keychain";

export default function DualCharmDemo() {
  return (
    <div style={{ width: "100%", height: "600px", position: "relative" }}>
      <Keychain
        charm1="https://svgl.app/library/github-light.svg"
        charm2="https://svgl.app/library/tailwind.svg"
        finish="HoloFoil"
        style="Shiny"
        transparent={true}
      />
    </div>
  );
}

Props Reference

| Prop | Type | Default | Description | | :--- | :--- | :--- | :--- | | svg | string | — | Single SVG string or URL. Shorthand for charm1. | | charm1 / charm1Svg | string | YouTube logo | Primary charm SVG string or URL. | | charm2 / charm2Svg | string | Gemini logo | Secondary charm SVG string or URL. | | charms | (string \| CharmConfig)[] | — | Array of charm configurations. | | charmCount | 1 \| 2 | 2 (if charm2 present) | Total number of charms on the ring. | | finish | FinishId | "Silver" | Metallic or mineral finish preset. | | style | "Shiny" \| "Matte" | "Shiny" | Surface finish reflectivity. | | customColor | string | "#ec4899" | Hex color used when finish="Custom". | | transparent | boolean | false | Enables WebGL alpha transparency. | | background | string \| null | null | Solid background color or "transparent". | | isDark | boolean | false | Adjusts specular lighting for dark surfaces. | | interactive | boolean | true | Enables pointer drag and physics impulse. | | showLoader | boolean | true | Shows loading indicator during fetch/build. | | loader | ReactNode \| boolean | Default Spinner | Custom React loader component or false. | | proxyUrl | string | — | Custom CORS proxy template for remote URLs. | | className | string | "" | CSS classes for the container element. | | styleProps | CSSProperties | undefined | Inline styles for the container element. | | onLoad | () => void | — | Callback fired when rendering is complete. | | onError | (err: Error) => void | — | Callback fired on fetch or parse failure. | | onLoadingChange | (loading: boolean) => void | — | Callback fired when loading state changes. |


Available Finishes

Import FINISH_OPTIONS or FINISH_MAP for programmatic access:

| Finish ID | Name | Tone | | :--- | :--- | :--- | | "Silver" | Silver Chrome | Polished chrome | | "Gold" | 24K Gold | Warm yellow gold | | "Platinum" | Platinum | Bright crisp platinum | | "HoloFoil" | Holographic Foil | Iridescent chromatic dispersion | | "Rose Gold" | Rose Gold | Warm copper rose | | "Champagne" | Champagne Gold | Pale soft champagne | | "Brass" | Antique Brass | Brushed industrial brass | | "Copper" | Sunset Copper | Vibrant sunset copper | | "Bronze" | Antique Bronze | Deep classical bronze | | "Titanium" | Titanium Grey | Space-grade brushed titanium | | "Pewter" | Brushed Pewter | Matte tactile pewter | | "Sandblasted" | Raw Sandblasted | High-roughness matte alloy | | "Graphite" | Graphite Grey | Deep gunmetal graphite | | "Damascus" | Damascus Pearl | Dark pearlescent steel | | "Gunmetal" | Space Black | Deep space black | | "Ruby" | Imperial Ruby | Gemstone ruby red | | "Amethyst" | Amethyst Violet | Mineral purple | | "Cobalt" | Navy Cobalt | Deep vibrant blue chrome | | "Midnight" | Midnight Navy | Dark twilight navy | | "Steel Blue" | Steel Blue | Crisp industrial blue-grey | | "Emerald" | Emerald Chrome | Lustrous mineral green | | "Custom" | Custom Tint | Custom hex tint from customColor |


Advanced Usage

Custom Loading State

import { Keychain } from "studio-keychain";

export default function CustomLoaderExample() {
  return (
    <Keychain
      svg="https://svgl.app/library/supabase.svg"
      loader={
        <div style={{ fontSize: "12px", opacity: 0.6 }}>
          Loading 3D mesh...
        </div>
      }
    />
  );
}

Raw SVG Code

import { Keychain } from "studio-keychain";

const STAR_SVG = `
<svg width="100" height="100" viewBox="0 0 24 24" fill="#f59e0b">
  <polygon points="12,2 15,9 22,9 17,14 19,21 12,17 5,21 7,14 2,9 9,9" />
</svg>
`;

export default function RawSvgExample() {
  return <Keychain svg={STAR_SVG} finish="Gold" />;
}

Technical Stack

  • Graphics: Three.js, SVGLoader, PMREM RoomEnvironment
  • Physics: Cannon.js
  • Framework: React, Next.js, TypeScript
  • Bundler: tsup (ESM & CJS output)

License

MIT License. See LICENSE for details.