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

@otto201613/pokemon-card-3d

v1.0.0

Published

Pokemon TCG card component with 3D interactions and authentic foil effects

Readme

pokemon-card-3d

Pokemon TCG card component with authentic 3D interactions and foil/holographic effects, built for React.

npm version license


Features

  • 🎴 Authentic 3D tilt effect on mouse/touch interaction
  • ✨ 15+ foil effects: Holo, Cosmos, Radiant, Rainbow, Secret Rare, V Full Art, Shiny Vault…
  • 📐 Fully size-adaptive — set any width, height is automatic
  • 🎯 Self-contained state — drop in anywhere, no external state management needed
  • 🔮 Showcase mode — auto-rotating animation on mount
  • 💪 TypeScript first

Install

npm install pokemon-card-3d @react-spring/web
# or
pnpm add pokemon-card-3d @react-spring/web

Peer dependencies: react >=18, react-dom >=18, @react-spring/web >=10


Quick Start

import { Card } from "pokemon-card-3d";
import "pokemon-card-3d/style";

export default function App() {
  return (
    <Card
      id="swsh1-25"
      name="Pikachu"
      number="25"
      set="swsh1"
      types={["lightning"]}
      rarity="rare holo"
      img="https://images.pokemontcg.io/swsh1/25_hires.png"
    />
  );
}

Props

| Prop | Type | Default | Description | |:------------ |:---------------------- |:-------------- |:-------------------------------------------------------- | | img | string | required | Front face image URL | | id | string | "" | Unique card ID (e.g. "swsh1-25") | | name | string | "" | Card name (used for aria-label) | | number | string \| number | "" | Card number within its set | | set | string | "" | Set code (e.g. "swsh1") | | types | string \| string[] | "" | Element types — controls glow color | | subtypes | string \| string[] | "basic" | Subtypes (e.g. ["Stage 2"]) | | supertype | string | "pokémon" | "pokémon" | "trainer" | "energy" | | rarity | string | "common" | Card rarity — drives the foil effect (see table below) | | back | string | Official back | Back face image URL | | foil | string | "" | Foil overlay image URL (for masked foil cards) | | mask | string | "" | Mask image URL (for selective foil regions) | | width | number | 250 | Card width in pixels — height auto from aspect ratio | | showcase | boolean | false | Auto-rotate animation on mount | | className | string | "" | Extra class names on the root element | | onActivate | () => void | — | Fired when card is tapped/clicked to expand | | onDeactivate | () => void | — | Fired when card collapses |


Rarity Values & Effects

| rarity value | Effect | |:----------------------------- |:------------------------- | | "common" / "uncommon" | Glare only | | "rare holo" | Rainbow holo bars | | "rare holo cosmos" | Galaxy/cosmos texture | | "amazing rare" | Glitter + foil mask | | "radiant rare" | Criss-cross sparkle | | "*reverse holo" | Reverse foil (any ending in reverse holo) | | "rare ultra" | V Full Art sunpillar | | "trainer gallery rare holo" | Metallic iridescent | | "rare secret" | Gold glitter | | "rare shiny" / "rare shiny v" / "rare shiny vmax" | Shiny Vault |


Size Examples

{/* Small card */}
<Card img="..." rarity="rare holo" width={180} />

{/* Default */}
<Card img="..." rarity="rare holo" width={250} />

{/* Large display */}
<Card img="..." rarity="rare holo" width={400} />

{/* Full-width responsive — wrap in a container */}
<div style={{ width: "100%", maxWidth: 320 }}>
  <Card img="..." rarity="rare holo" width={320} />
</div>

Custom Image Assets

The foil effects for Cosmos Holo, Secret Rare, Amazing Rare, and Trainer Full Art require texture images. By default these are loaded from the jsDelivr CDN.

To use your own hosted images, override the CSS custom properties before importing the component styles:

:root {
  --pkm-img-glitter:       url("/assets/glitter.png");
  --pkm-img-grain:         url("/assets/grain.webp");
  --pkm-img-cosmos-bottom: url("/assets/cosmos-bottom.png");
  --pkm-img-cosmos-middle: url("/assets/cosmos-middle-trans.png");
  --pkm-img-cosmos-top:    url("/assets/cosmos-top-trans.png");
  --pkm-img-trainer-bg:    url("/assets/trainerbg.png");
  --pkm-img-geometric:     url("/assets/geometric.png");
}

Showcase Mode

<Card
  img="https://images.pokemontcg.io/swsh1/25_hires.png"
  rarity="rare holo cosmos"
  showcase   {/* auto-rotates for 4 seconds on mount */}
  width={300}
/>

Callbacks

<Card
  img="..."
  rarity="rare ultra"
  onActivate={() => console.log("card expanded!")}
  onDeactivate={() => console.log("card collapsed!")}
/>

License

MIT