PHPackages                             nickdekruijk/vanilla-slider - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. nickdekruijk/vanilla-slider

ActiveLibrary

nickdekruijk/vanilla-slider
===========================

A vanilla javascript slider

1.1.0(1y ago)1101↓100%MITJavaScript

Since Mar 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nickdekruijk/vanilla-slider)[ Packagist](https://packagist.org/packages/nickdekruijk/vanilla-slider)[ RSS](/packages/nickdekruijk-vanilla-slider/feed)WikiDiscussions master Synced today

READMEChangelog (4)DependenciesVersions (6)Used By (0)

vanilla-slider
==============

[](#vanilla-slider)

A simple slider script with css transitions for effects. It works by applying an active class on the the active slide so you can customize all transitions with css.

Usage
-----

[](#usage)

Add some slider elements to your html for example

```

        An image!

        Another image

    >
    >

```

Include the main script

```

```

Add the following javascript to your project and change where needed

```
var slider = new Slider({
    selector: '.slider',
    slideSelector: '.slide',
    interval: 5000,
});
```

And finaly apply some css, for example

```
.slider {height:33.333333vw;position:relative}
.slider .slide {position:absolute;top:0;right:0;bottom:0;left:0}
.slider .slide IMG {display:block;width:100%;height:100%;object-fit:cover}
.slider .slide H2 {position:absolute;z-index:1;color:$white;bottom:0;font-size:3vw;padding:1vw}
.slider .slide {opacity:0;transition:opacity 0s, transform 0s;transition-delay:1s;z-index:1}
.slider .slide.active {opacity:1;z-index:2;transition-delay:0s;transition:opacity 1s, transform 1s}
.slider:hover .slider-prev,
.slider:hover .slider-next {position:absolute;top:50%;display:block;transform:translateY(-50%);z-index:10;width:40px;height:40px;border-radius:100%;background-color:rgba(0,0,0,0.2);cursor:pointer}
.slider:hover .slider-prev:hover,
.slider:hover .slider-next:hover {background-color:rgba(0,0,0,0.4)}
.slider .slider-prev::before,
.slider .slider-next::before {content:'';width:14px;height:14px;display:block;position:absolute;border-top:3px solid #fff;border-right:3px solid #fff;top:50%;left:50%}
.slider .slider-prev {left:10px}
.slider .slider-next {right:10px}
.slider .slider-prev::before {transform:translate(-6px,-50%) rotate(-135deg)}
.slider .slider-next::before {transform:translate(-12px,-50%) rotate(45deg)}
.slider .slider-dots {position:absolute;bottom:0;right:0;z-index:10;line-height:1}
.slider .slider-dot {display:inline-block;width:11px;height:11px;margin:0 5px;border:1px solid #ccc;border-radius:100%;background-color:#ccc;cursor:pointer;color:transparent}
.slider .slider-dot.active {background-color:#fff}
```

###  Health Score

34

—

LowBetter than 79% of packages

Maintenance49

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~366 days

Total

5

Last Release

369d ago

Major Versions

0.0.2 → 1.0.02021-03-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b01fc7c2c39bbe8f87b4afa70ffe1cf2bb787310e1d22fcfed6ae527d4573bb?d=identicon)[nickdekruijk](/maintainers/nickdekruijk)

---

Top Contributors

[![nickdekruijk](https://avatars.githubusercontent.com/u/607302?v=4)](https://github.com/nickdekruijk "nickdekruijk (11 commits)")

---

Tags

javascriptslider

### Embed Badge

![Health badge](/badges/nickdekruijk-vanilla-slider/health.svg)

```
[![Health](https://phpackages.com/badges/nickdekruijk-vanilla-slider/health.svg)](https://phpackages.com/packages/nickdekruijk-vanilla-slider)
```

###  Alternatives

[tightenco/ziggy

Use your Laravel named routes in JavaScript.

4.3k39.7M235](/packages/tightenco-ziggy)[matthiasmullie/minify

CSS &amp; JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.

2.0k29.7M280](/packages/matthiasmullie-minify)[friendsofsymfony/jsrouting-bundle

A pretty nice way to expose your Symfony routing to client applications.

1.5k52.7M206](/packages/friendsofsymfony-jsrouting-bundle)[tedivm/jshrink

Javascript Minifier built in PHP

76137.1M121](/packages/tedivm-jshrink)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
