Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
/ nanoslider Public archive

A minimalistic vanilla JS library for creating super-lightweight, touch-friendly, and responsive carousels and sliders. NanoSlider is less than 7kb and only 4kb when minified.

Notifications You must be signed in to change notification settings

mariawarnes/nanoslider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NanoSlider

Installation:

  • Click the green Code button
  • Click Download ZIP
  • Copy either the minified files in the /dist folder or the nanoslider.css and nanoslider.js in the root of the folder you're working in
  • In the <head> of your html page add the following: <link rel="stylesheet" href="nanoslider{.min}.css"/>
  • Just before the closing </body> tag of your html page add the following: <script src="nanoslider{.min}.js"></script>
  • Recommended HTML structure:
<div class="carousel-wrap">
  <div class="carousel">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
  </div>
  <button class="prev-button" aria-label="Previous Item">Prev</button>
  <button class="next-button" aria-label="Next Item">Next</button>
</div>

Example: https://codepen.io/mariawarnes/pen/ExdobEJ

About

A minimalistic vanilla JS library for creating super-lightweight, touch-friendly, and responsive carousels and sliders. NanoSlider is less than 7kb and only 4kb when minified.

Resources

Stars

Watchers

Forks