컴포넌트

Double Sided Card

호버 또는 클릭 시 3D로 뒤집혀 뒷면이 보이는 카드. rotateX/Y(180deg)와 backface-visibility로 앞/뒤 면을 구현하며, 앞면·뒷면 콘텐츠를 prop으로 받는다. 호버·클릭·둘 다 트리거, 회전 축(x/y), 크기·색상·전환 시간을 조절할 수 있고 reduced-motion 시 즉시 전환한다.

분류
컴포넌트
난이도
easy
변형
TS-TW

설치

npx shadcn@latest add https://gasan.ai.kr/tools/effect/r/DoubleSidedCard-TS-TW

Props

이름타입기본값설명
frontReactNode—앞면 콘텐츠 (필수)
backReactNode—뒷면 콘텐츠 (필수)
trigger"hover" | "click" | "both""both"뒤집기 트리거 방식
axis"x" | "y""y"회전 축 (세로축 Y / 가로축 X)
widthnumber260카드 너비(px)
heightnumber180카드 높이(px)
frontColorstring"#C084FC"앞면 그라데이션 시작색
frontColorEndstring"#EC4899"앞면 그라데이션 끝색
backColorstring"#16121F"뒷면 표면색
borderColorstring"#2A2440"보더 색
durationnumber600전환 시간(ms)
defaultFlippedbooleanfalse초기 뒤집힘 여부
ariaLabelstring"카드 뒤집기"접근성 라벨