Fan Cards

A neat stack that fans out like a hand of playing cards.

no dependenciesMIT · free
01Wave 1
02Wave 2
03Wave 3
04Wave 4
05Wave 5

Installation

npx shadcn@latest add https://ombakui.com/r/fan-cards.json

Usage

import { FanCards } from "@/components/fan-cards";

<FanCards spread={40}>
  <Card /> <Card /> <Card /> <Card />
</FanCards>

Props

PropTypeDefaultDescription
children*ReactNode–Each direct child becomes a card in the hand.
spreadnumber40Total spread angle in degrees when fanned.
offsetnumber56Horizontal distance (px) between fanned cards.
cardClassNamestring"h-56 w-40"Card size classes.
classNamestring–