ReactAwesome Slider
<AwesomeSlider/>~7KB compressed
React Awesome Slider is a 60fps, extendable, highly customisable, production ready javascript react component that renders an animated set of UI gallery sliders.
Fold Animation
Open Animation Styles
For this example we're importing the open-animation style modules.
.jsx
import AwesomeSlider from 'react-awesome-slider'; import AwesomeSliderStyles from 'react-awesome-slider/src/styled/open-animation.scss'; const Slider = ( <AwesomeSlider cssModule={AwesomeSliderStyles}> <div data-src="/path/to/image-0.jpg" /> <div data-src="/path/to/image-1.jpg" /> <div data-src="/path/to/image-2.jpg" /> <div data-src="/path/to/image-3.jpg" /> </AwesomeSlider> );
Styling the open animation
The animation exit styling on the open-animation .scss file is not that straight forward but you can easily customize it using the --open CSS properties. Checkout the full style source here.
.scss
.aws-sld { --open-animation-perspective: 600px; --open-animation-angle: 8deg; --open-animation-enter-delay: 85ms; ... }
Customisation
Basic customization through the component's props and CSS custom-properties.
Component's global props
- true
- true
- false
CSS Custom Properties
- 60%
- 770ms
- 4px
- 0px
- 40px
- #6a6a6a
- 10%
- 25%
- transparent
- #6a6a6a
- #6a6a6a
- #851515
- 6px