Coder Social home page Coder Social logo

edouardproust / carousel Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 3.84 MB

Library made with JS and PHP to add a carousel to your website. Many options are available to customize your carousels.

Home Page: http://phpstack-856558-2958244.cloudwaysapps.com/

PHP 51.04% JavaScript 34.23% CSS 14.73%
carousel javascript js presentation slider slides slideshow

carousel's Introduction

light carousel

A lightweight library allowing to easily integrate a carousel to a PHP project. It uses javascript without framework.

๐Ÿ‘‰ Live demo

image

The creation of a carousel is simplified by the signature of the object.

The options of the carousel are the following:

  • slidesVisible : how many slides are visible inside the carousel viewport?
  • slidesToScroll : how many slides should be scrolled when the user clicks on left or right arrows?
  • infiniteScroll : should we go back to slide 1 when the last slide has been reached?

Here is how to create a new carousel:

require 'src/Carousel.php';

$carousel = new Carousel(
    [
        new Slide(
            'Slide content 1',
            'Slide title 1',
            'image1.jpg',
            'http://www.link1.com'
        ),
        new Slide(
            'Slide content 2',
            'Slide title 2',
            'image2.jpg',
            'http://www.link2.com'
        )
    ], [
        'slidesVisible' => 2,
        'slidesToScroll' => 1,
        'infiniteScroll' => 1
    ]
);

$carousel->show();

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.