components/trading-card
Type Aliases
Section titled “Type Aliases”TradingCardFinish
Section titled “TradingCardFinish”TradingCardFinish =
"standard"|"holo"
Print finish: holo adds a foil sheen on hover that stills for reduced motion.
TradingCardFact
Section titled “TradingCardFact”TradingCardFact =
Readonly<{label:string;value:ReactNode; }>
One footer fact, printed like a trading card’s weakness or retreat line.
TradingCardMove
Section titled “TradingCardMove”TradingCardMove =
Readonly<{cost?:ReactNode;name:string;value?:ReactNode;children?:ReactNode; }>
The card’s one move: a cost of symbols, a name, and caller-owned text or controls.
TradingCardProps
Section titled “TradingCardProps”TradingCardProps =
Omit<HTMLAttributes<HTMLElement>>,"title"|"children"> > &object
Props accepted by TradingCard.
Type Declaration
Section titled “Type Declaration”name:
string
stage?
Section titled “stage?”
optionalstage?:string
A small stage label printed before the name, such as “Spore”.
optionalstat?:ReactNode
The stat printed at the right of the name bar, such as “60 SP”.
typeLine?
Section titled “typeLine?”
optionaltypeLine?:string
The type line under the art window.
art:
ReactNode
move:
TradingCardMove
flavor?
Section titled “flavor?”
optionalflavor?:ReactNode
facts?
Section titled “facts?”
optionalfacts?: readonlyTradingCardFact[]
setNumber?
Section titled “setNumber?”
optionalsetNumber?:string
Collector number, such as “001/001”.
rarity?
Section titled “rarity?”
optionalrarity?:ReactNode
A small rarity mark printed by the set number.
finish?
Section titled “finish?”
optionalfinish?:TradingCardFinish
Variables
Section titled “Variables”TradingCard
Section titled “TradingCard”
constTradingCard:ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>>,"title"|"children"> > &object&RefAttributes<HTMLElement>>>>
A 63:88 trading card: a bright rim, a name bar with a stage and stat, an art window, one move row that can hold a real form, a flavor line and a footer of facts with a set number and rarity mark. The move body is caller-owned, so a form inside it keeps its own labels, focus and errors.