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/holo-card

v0.1.0

Published

宝可梦 TCG 卡牌全息/闪卡视觉特效 React 组件,自适应尺寸,支持桌面端与移动端触控交互

Readme

@otto201613/holo-card

宝可梦 TCG 卡牌全息/闪卡视觉特效 React 组件。给一张卡牌的元数据(或者直接把 pokemontcg.io 返回的原始 JSON 传进来),就能渲染出跟随鼠标/触摸的 3D 全息、彩虹、Shiny Vault 等特效卡面。桌面端和移动端触控都做了单独的交互适配,卡片默认按父容器宽度自适应(带一个可覆盖的默认上限)。

移植自 simeydotme/pokemon-cards-css(GPL-3.0),见 LICENSE

安装

npm install @otto201613/holo-card
# 或 pnpm add / yarn add

reactreact-dom@react-spring/web 是 peerDependencies,需要你的项目里已经安装(版本 ^19 / ^10)。

用法

import { AudenCard } from "@otto201613/holo-card";
import "@otto201613/holo-card/style.css";

function Example() {
  return (
    <AudenCard
      id="swsh12-049"
      name="Galarian Articuno"
      set="swsh12"
      number="049"
      rarity="Rare Holo"
      supertype="Pokémon"
      subtypes={["Basic"]}
      types={["Psychic"]}
      img="https://images.pokemontcg.io/swsh12/49_hires.png"
      cdnBase="https://poke-holo.b-cdn.net"
    />
  );
}

直接传 pokemontcg.io 卡牌 JSON

不想手动拆字段的话,把 API 返回的卡牌对象整个传给 card:

<AudenCard
  card={{
    id: "swsh12-049",
    name: "Galarian Articuno",
    supertype: "Pokémon",
    subtypes: ["Basic"],
    types: ["Psychic"],
    rarity: "Rare Holo",
    number: "049",
    set: { id: "swsh12" },
    images: { large: "https://images.pokemontcg.io/swsh12/49_hires.png" },
  }}
  cdnBase="https://poke-holo.b-cdn.net"
/>

单独传的字段(id/rarity/img 等)优先级高于 card 里的同名字段,可用来覆盖个别值。

尺寸自适应

<AudenCard> 默认宽度撑满父容器、按卡牌固定比例自动算高度,没有外层容器约束时会封顶在一个合理的默认宽度。想要自定义尺寸,直接控制父容器宽度,或者覆盖 CSS 变量:

.my-card-slot {
  --auden-card-max-width: 240px;
}

更多用法示例

克隆仓库后运行 pnpm dev,examples/App.tsx 里有完整的用法演示(自动拼资源 / 自定义 mask+foil / 无 holo 普通卡 / 展示动画 / card 对象等)。

License

GPL-3.0-only — 因为上游 simeydotme/pokemon-cards-css 使用 GPL-3.0,本项目作为其衍生作品继续沿用同一协议。