[comp:Carousel] feature Carousel component
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
走马灯,展示一组轮播的区域,常用于一组图片或卡片轮播
What does the proposed API look like?
API
参数 | 说明 | 类型 | 默认值 | 全局配置 | 备注 |
---|---|---|---|---|---|
autoplayTime | 自动播放的时间间隔,为 0 时不自动切换 | number | 0 | ✅ | - |
dotPosition | 面板指示点位置 | string | bottom |
✅ | 可选值为 top bottom left right |
dots | 是否显示面板指示点 | boolean | true | ✅ | - |
easing | 动画效果 | string | linear |
✅ | - |
effect | 动画效果函数 | scrollx | fade |
scrollx |
✅ | - |
Emits
名称 | 说明 | 类型 | 备注 |
---|---|---|---|
change | 幻灯片切换时触发 | (currentSlide: any, nextSlide: any) => void | - |
Methods
名称 | 描述 | 备注 |
---|---|---|
goTo(slideNumber, dontAnimate) | 切换到指定面板, dontAnimate = true 时,不使用动画 | - |
next() | 切换到下一面板 | - |
prev() | 切换到上一面板 | - |
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Carousel - Bootstrap
A slideshow component for cycling through elements—images or slides of text—like a carousel. How it works. The carousel is a slideshow for cycling...
Read more >React-Bootstrap Carousel Component - GeeksforGeeks
Carousel Component provides a way to create a slideshow for our images or text slides with a present full manner in a cyclic...
Read more >Auto-Rotating Image Carousel Example with Buttons for Slide ...
If the carousel is rotating, the button's accessible name is "Stop Automatic Slide Show", informing screen reader users that the slides are changing...
Read more >Carousel Usability: Designing an Effective UI for Websites with ...
Carousels allow multiple pieces of content to appear high on the homepage. A good carousel offers visible, understandable controls and ...
Read more >Product Carousel - AEM Core Components
The Product Carousel component is a server-side component written in HTL, allowing to display a list of featured products in a carousel style....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
API已修改
走马灯的使用场景基本都是轮播吧,canDeactivate暂时没有想到使用场景,后面业务有需要的话可以再补充; beforechange api也暂时移除,理由同上。