CardStack
Row stack container for composing multiple CardRow children without doubled borders.

Lugia V
$214.75

M Venusaur EX
$27.97

Gengar VMAX
$191.20
import { CardRow, CardStack } from "@cardspark/ui/core"; const cards = [ { id: "sit-186", name: "Lugia V", set: "Silver Tempest", setCode: "SIT", number: "186/195", rarity: "Special Illustration Rare", condition: "Near Mint", finish: "Holofoil", marketValue: "$214.75", delta: "+5.4%", imageUrl: "https://images.pokemontcg.io/swsh12/186_hires.png" }, { id: "evo-100", name: "M Venusaur EX", set: "XY - Evolutions", setCode: "EVO", number: "100/108", rarity: "Ultra Rare", condition: "Lightly Played", finish: "Holofoil", marketValue: "$27.97", delta: "+2.16%", imageUrl: "https://images.pokemontcg.io/xy12/100_hires.png" }, { id: "fst-271", name: "Gengar VMAX", set: "Fusion Strike", setCode: "FST", number: "271/264", rarity: "Secret Rare", condition: "Near Mint", marketValue: "$191.20", delta: "+12.6%", imageUrl: "https://images.pokemontcg.io/swsh8/271_hires.png" }]; export function CardStackDemo() { return ( <CardStack> {cards.map((card) => ( <CardRow key={card.id} format="market" card={card} /> ))} </CardStack> );}Installation
Install the package.
npm install @cardspark/uiImport the shared stylesheet layer near your app root.
app/layout.tsx
import "@cardspark/ui/tokens.css";import "@cardspark/ui/themes/basement.css";import "@cardspark/ui/styles.css";Import and render CardStack from its package entry point.
Usage
CardStackDemo.tsx
import { CardRow, CardStack } from "@cardspark/ui/core"; const cards = [ { id: "sit-186", name: "Lugia V", set: "Silver Tempest", setCode: "SIT", number: "186/195", rarity: "Special Illustration Rare", condition: "Near Mint", finish: "Holofoil", marketValue: "$214.75", delta: "+5.4%", imageUrl: "https://images.pokemontcg.io/swsh12/186_hires.png" }, { id: "evo-100", name: "M Venusaur EX", set: "XY - Evolutions", setCode: "EVO", number: "100/108", rarity: "Ultra Rare", condition: "Lightly Played", finish: "Holofoil", marketValue: "$27.97", delta: "+2.16%", imageUrl: "https://images.pokemontcg.io/xy12/100_hires.png" }, { id: "fst-271", name: "Gengar VMAX", set: "Fusion Strike", setCode: "FST", number: "271/264", rarity: "Secret Rare", condition: "Near Mint", marketValue: "$191.20", delta: "+12.6%", imageUrl: "https://images.pokemontcg.io/swsh8/271_hires.png" }]; export function CardStackDemo() { return ( <CardStack> {cards.map((card) => ( <CardRow key={card.id} format="market" card={card} /> ))} </CardStack> );}Composition
Use CardStack as the row-list composite above CardRow.
CardStack├── CardRow│ ├── CardArt thumbnail│ ├── CardBadgeStack│ └── value / chart / movement├── CardRow└── CardRowKeep filtering, sorting, loading, and empty states in the parent surface.
Features
- Composes multiple
CardRowchildren as one framed row group. - Keeps the first row's top border and following row borders from doubling up.
- Passes div attributes such as
classNamethrough for section-level layout.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | CardRow children to arrange in one continuous stack. |
className | string | - | Optional class name for layout overrides. |