Simple carousel component
- css only fallback
- no unnecessary css, style it yourself!
- keyboard navigation
- play / stop
- stops playing if focus is inside
- slide on focus (eg. inputs inside)
- 3 Modes (slide, scroll, fade)
- light-weight
<u1-carousel autoplay controls>
<div>Item 1</div>
<div>Item 2</div>
</u1-carousel>
u1-carousel {
background:var(--color-light);
}
u1-carousel > :not([slot]) {
padding:3rem;
text-align:center;
}
<link href="https://cdn.jsdelivr.net/gh/u1ui/[email protected]/carousel.min.css" rel=stylesheet>
<script src="https://cdn.jsdelivr.net/gh/u1ui/[email protected]/carousel.min.js" type=module></script>
experiments.html
minimal.html
nested.html
test.html
- MIT License, Copyright (c) 2022 (like all repositories in this organization)
- Suggestions, ideas, finding bugs and making pull requests make us very happy. ♥