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


Scale Animation Styles
For this example we're importing the scale-out-animation overwritten style modules.
.jsx
import AwesomeSlider from 'react-awesome-slider'; import AwesomeSliderStyles from 'react-awesome-slider/src/styled/scale-out-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> );
How to extend it
The animation exit styling on the scale-out-animation .scss file is pretty straight forward. We just apply the scaling down on exit moveLeft and exit moveRight classes of the active box container.
.scss
.aws-sld { &--exit { &.aws-sld--moveRight, &.aws-sld--moveLeft { animation: scaleOut var(--slider-transition-duration) both var(--transition-bezier); } } } @keyframes scaleOut { to { transform: scale(0.85); } }
Customisation
Basic customization through the component's props and CSS custom-properties.
Component's global props
- true
- true
- false
CSS Custom Properties
- 60%
- 670ms
- 6px
- 0px
- 40px
- #6a6a6a
- 10%
- 25%
- transparent
- #6a6a6a
- #6a6a6a
- #851515
- 6px