Animations Experimental Slider Using SVG Clip-path | Elastic Slider

Elastic Slider is an experimental slider that uses the SVG clip-path feature and Snap.svg-powered animation.

elastic image slider, elastic slider github, responsive thumbnail slider, image slider in javascript source code, right to left image slider javascript

Pure JavaScript Slider Image Carousel With Or Without Thumbnails

How to make use of it:

Download the necessary Snap.svg library from the CDN.

<script src="//cdnjs.cloudflare.com/ajax/libs/snap.svg/0.4.1/snap.svg-min.js"></script>

Load the Elastic Slider’s JavaScript and Stylesheet files onto the HTML page.

<link href="elastic-slider.css" rel="stylesheet">
<script src="elastic-slider.js"></script>

Lightweight and Powerful Responsive Carousel Slider Javascript Plugin | Splide

Html structure for slider.

<div class="elastic-slider">
  <div id="slide1"></div>
  <div id="slide2"></div>
  <div id="slide3"></div>
</div>

Add background images to the slider.

#slide1 {
  background-image: url("1.jpg")
}

#slide2 {
  background-image: url("2.jpg")
}

#slide3 {
  background-image: url("3.jpg")
}

Create the flex effect using the SVG clip-path:

.clipped-left {
  -webkit-clip-path: url(#clipped-left);
  clip-path: url(#clipped-left);
}

.clipped-right {
  -webkit-clip-path: url(#clipped-right);
  clip-path: url(#clipped-right);
}

Create a new ElasticSlider object to initialize the slider.

new ElasticSlider('.elastic-slider');

possible options.

new ElasticSlider('.elastic-slider',{

    // Max distance (px) for stretching effect.
    maxStretch: 100,

    // Parameter that allows to customize the curve in the stretching effect. 
    // A setting of 0 results in straight lines, and higher values result in steeper curves.
    bezierLen: 80

});

All possible options

NameTypeDefaultDescription
maxStretchinteger100Max distance (px) for stretching effect.
bezierLeninteger80Parameter that allows to customize the curve in the stretching effect. A setting of 0 results in straight lines, and higher values result in steeper curves.

Elastic Image Slider Plugin/Github


See Demo And Download

Official Website(lmgonzalves): Click Here

This superior jQuery/javascript plugin is developed by lmgonzalves. For extra Advanced Usage, please go to the official website.

Related Posts

Data-Table-Generator-Tabulator

Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…

alert-confirm-prompt-attention-js

Simple Alert, Confirm, Prompt Popup Using Vanilla JavaScript Library | attention.js

JavaScript provides various built-in functionality to display popup messages for different purposes. Attention JS is a vanillaJS plugin used to create a custom alert, confirm, or Prompt…

Bootstrap-4-Toast-Notification-Plugin

Lightweight Bootstrap 4 Toast Notification Plugin | BS4 Advanced Toast

A lightweight Bootstrap 4 Toast Notification plugin integrated with JS/jQuery. bs4-toast.js is a JavaScript library that enhances the native Bootstrap toast component with icons, buttons, callbacks, and…

Audio-Visualizations-Wave

How to Create Audio Visualizations with JavaScript | Wave.js

Audio Visualizer Library – wave.js is a vanilla javascript audio visualization library that provides 20+ creative audio visualization effects to bring more engagement to your visitor. Contribute…

swiper-touch-slider

Modern Mobile Touch Slider With Acceleration Transitions | Swiper

Swiper is the most modern free mobile touch slider with accelerated device transitions and amazing original behavior. It is intended for use in mobile websites, mobile web…

Confetti-Falling-Animation-Effect-party

Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…

Leave a Reply

Your email address will not be published. Required fields are marked *