← Docs

API Reference

<PrismoCard />

PropTypeDefaultDescription
rarityRarity | string'common'The holographic effect to apply. Built-in values: 'common', 'rare holo', 'rare holo galaxy', 'rare holo v', 'rare holo vmax', 'rare holo vstar', 'rare rainbow', 'rare rainbow alt', 'rare secret', 'rare ultra', 'radiant', 'custom'.
supertypestring'pokémon'Card supertype. Affects clip-path regions for some rarity effects.
subtypestring'basic'Card subtype. Affects clip-path for stage/supporter variants.
gallerybooleanfalseWhen true, disables clip-path so the foil effect covers the entire card surface.
imagestringundefinedURL of a custom foil overlay image. Only used when rarity is 'custom'.
classNamestringundefinedAdditional CSS class applied to the root .card element.
childrenReactNodeundefinedThe card content — typically an image or custom markup.

Rarity type

type Rarity =
  | 'common'
  | 'rare holo'
  | 'rare holo galaxy'
  | 'rare holo v'
  | 'rare holo vmax'
  | 'rare holo vstar'
  | 'rare rainbow'
  | 'rare rainbow alt'
  | 'rare secret'
  | 'rare ultra'
  | 'radiant'
  | 'custom';

The rarity prop also accepts arbitrary strings for forward compatibility with future CSS effects.

CSS Custom Properties

The component sets these CSS variables on the card rotator element in real-time during pointer interaction:

PropTypeDefaultDescription
--mx, --mypercentage50%Pointer X/Y position relative to card (0–100%).
--rx, --rydeg0deg3D rotation angles derived from pointer offset.
--posbackground-position50% 50%Combined position for shine gradients.
--posx, --posypercentage50%Individual axis positions for gradient offsets.
--hyp0–10Distance from center (hypotenuse), normalized. Controls brightness.
--o0 | 10Interaction active flag. 1 during hover, 0 on leave.
--snumber1Scale factor (reserved for future use).
--customimageurl()noneSet on hover when rarity is 'custom'. Uses the image prop value.

CSS Class Structure

.card                    → Root container (data-rarity, data-supertype, data-subtypes, data-gallery)
  .card__translater      → Perspective container
    .card__rotator       → 3D transform target (receives CSS vars)
      .card__front       → Face container
        [children]       → Your content
        .card__shine     → Holographic gradient overlay
        .card__glare     → Specular glare overlay