GithubHelp home page GithubHelp logo

castastrophe / slick Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 197 KB

HTML, Sass, and JS for the creation of a slider component (can be used to create carousels).

License: GNU General Public License v3.0

JavaScript 20.80% Twig 29.76% SCSS 49.44%

slick's Introduction

Slider component

Sliders are navigational components which can be used in conjunction with the band switcher layout to create a carousel effect on your page.

Traditional carousel slider as a full band

Screenshot 2022-12-11 at 10 14 35 PM

Carousel-style slider inside a card

Screenshot 2022-12-11 at 10 12 35 PM

Button-driven slider as a full band

Screenshot 2022-12-11 at 10 13 47 PM

Click here to view the demos

Building the slider

Sliders have 3 navigation styles to choose from (they can also be used together):

  • [data-nav-style="arrows"] Arrows
  • [data-nav-style="text"] Clickable boxes with descriptive text
  • [data-nav-style="circles"] Clickable circles with or without text

[data-slide-id]

  • This attribute connects the navigational elements to the corresponding content that it toggles between.
  • Any string can go in here as long as it does not contain spaces or periods.
  • This appears on the .slider-nav and the .switcher-body elements and must be identical or the content change will not trigger.

[data-active]

  • This attribute can be either true or false; it indicates which navigational element is styled in the active state (i.e., filled in circle or if a directional arrow is visible).
  • Only one navigational element should be set to active in the set.

[data-slide-to]

  • This determines which content item this navigational element will slide to, updated by JS after a selection is made

[data-direction]

  • Specific to arrows, this determines which direction through the content we are navigating.
  • Valid values are prev and next

slick's People

Contributors

castastrophe avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.