UNPKG

react-scroll-snapper

Version:

Swipeable views for React using CSS scroll snap

15 lines (13 loc) 258 B
.ScrollSnapper { display: flex; scroll-snap-type: x mandatory; overflow-x: scroll; scroll-behavior: smooth; } .ScrollSnapper > * { box-sizing: border-box; width: 100%; flex-shrink: 0; scroll-snap-align: center; scroll-snap-stop: always; }