Swiper
Bắt đầu hỗ trợ ở phiên bản:
- zmp-ui: 1.7.0
Swiper component: Component giúp tạo giao diện slider, thường sử dụng hiển thị một nhóm nội dung dạng slider như banner,...
Properties
Swiper
Name | Type | Default | Description |
---|---|---|---|
autoplay | boolean | false | Tự động chuyển slide |
defaultActive | number | 0 | Set active mặc định cho slide có index cụ thể |
dots | boolean | true | Ẩn/Hiện thanh indicators mặc định |
loop | boolean | true | Tạo swiper lặp lại các slide/không |
duration | number | 3000 | Thời gian tự động chuyển slide khi bật (autoplay) |
disableSwipe | boolean | false | Cho phép swipe để chuyển trang |
afterChange | (currentIndex: number) => void | callback function fired sau khi chuyển tới slide mới | |
ref | RefObject<SwiperRefObject> | Chứa swiper ref object |