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.
Cube Animation


Cube Animation Styles
For this example we're importing the cube-animation style modules.
.jsx
import AwesomeSlider from 'react-awesome-slider'; import AwesomeSliderStyles from 'react-awesome-slider/src/styled/cube-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 cube animation
The animation exit styling on the cube-animation .scss file is not that straight forward but you can easily customize it using the --cube CSS properties. Checkout the full style source here.
.scss
.aws-sld { --cube-animation-duration: 675ms; --cube-animation-perspective: 1800px; --cube-animation-ease-in: cubic-bezier(0.8, 0, 1, 0.8); --cube-animation-ease-out: cubic-bezier(0, 0.2, 0.2, 1); --cube-translateZ-distance: -225px; ... }
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