@lifarl/react-scroll-snap-slider
Version:
A React Slider / Carousel Component with Scroll Snapping and Intersection Observer. ***[Demo](https://lifarl.github.io/react-scroll-snap-slider/)***
32 lines (28 loc) • 593 B
text/typescript
import styled from 'styled-components'
export const StyledCarousel = styled.div`
width: 100%;
height: 100%;
display: flex;
align-items: center;
`
export const StyledSlider = styled.div`
::-webkit-scrollbar {
display: none;
}
-webkit-overflow-scrolling: touch;
-ms-overflow-style: none;
scrollbar-width: none;
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
overflow-x: scroll;
width: 100%;
`
export const StyledUl = styled.ul`
display: flex;
flex-wrap: nowrap;
white-space: nowrap;
list-style: none;
width: 100%;
padding: 0;
margin: 0;
`