컴포넌트로 돌아가기
스크롤 가능함을 표시하는 애니메이션 인디케이터입니다. 클릭 시 대상 요소나 다음 섹션으로 스크롤합니다.
설치
Import
@hua-labs/ui의 UI 컴포넌트를 @hua-labs/hua에서 통합 제공합니다.
UI 컴포넌트, 모션 훅, i18n을 하나의 패키지로 사용할 수 있습니다.
라이브 데모
데모 영역
Props
| 이름 | 타입 | 기본값 | 설명 |
|---|---|---|---|
targetId | string | - | Element ID to scroll to on click |
text | string | "Scroll down" | Display text |
position | "bottom-center" | "bottom-left" | "bottom-right" | "bottom-center" | Display position |
variant | "default" | "primary" | "secondary" | "outline" | "default" | Color variant |
size | "sm" | "md" | "lg" | "md" | Text size |
animated | boolean | true | Enable bounce animation |
autoHide | boolean | true | Auto hide on scroll |
hideThreshold | number | 100 | Hide after scrolling this many pixels |
iconName | IconName | - | Icon to display |
iconSize | number | - | Icon size (pixels) |
Code Examples
접근성
- •aria-label: 버튼에 text prop 값이 aria-label로 포함
- •버튼에 키보드로 포커스 및 클릭 가능: 버튼에 키보드로 포커스 및 클릭 가능