컴포넌트
Swipe Action Row
리스트 행을 좌우로 스와이프하면 숨은 액션 버튼이 드러나고, 러버밴드 비선형 저항과 스프링 스냅이 적용되는 컴포넌트. 접근성 버튼 대체 경로 제공.
- 분류
- 컴포넌트
- 난이도
- hard
- 변형
- TS-TW
설치
npx shadcn@latest add https://gasan.ai.kr/tools/effect/r/SwipeActionRow-TS-TW
Props
| 이름 | 타입 | 기본값 | 설명 |
|---|---|---|---|
| count | number | 3 | 표시할 행 개수 |
| titleOf | (index: number) => string | undefined | 행 제목 생성기 (기본: "메시지 N") |
| actions | SwipeAction[] | [보관, 삭제] | 스와이프 시 드러나는 액션 버튼 목록 (key/label/color/onAction) |
| resistance | number | 0.5 | 러버밴드 초과 이동 저항 계수 (작을수록 빡빡함) |
| className | string | undefined | 추가 CSS 클래스 |