컴포넌트
Scroll Snap Gallery
가로 스크롤 스냅 갤러리와 진행 도트입니다. scroll-snap-type으로 슬라이드가 딱 맞게 정렬되고, IntersectionObserver로 현재 인덱스를 계산하며, 도트 클릭 시 scrollIntoView로 해당 슬라이드로 이동합니다.
- 분류
- 컴포넌트
- 난이도
- easy
- 변형
- TS-TW
설치
npx shadcn@latest add https://gasan.ai.kr/tools/effect/r/ScrollSnapGallery-TS-TW
Props
| 이름 | 타입 | 기본값 | 설명 |
|---|---|---|---|
| count | number | 5 | 슬라이드 개수 (1~12로 클램프). |
| className | string | undefined | 루트 요소에 적용할 추가 className. |