# axialslider

> Simple slider with two axes and buttons

Latest version **2.0.0** (published 2020-03-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install axialslider
pnpm add axialslider
yarn add axialslider
bun add axialslider
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-03-24 |
| First published | 2019-11-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | TempViking |
| Maintainers | tempviking |
| Keywords | slider |

## Links

- npm: https://www.npmjs.com/package/axialslider
- Repository: https://github.com/TempViking/axialslider
- Homepage: https://github.com/TempViking/axialslider#readme
- Issues: https://github.com/TempViking/axialslider/issues
- npm.io page: https://npm.io/package/axialslider

## Alternatives

- [adhdev](https://npm.io/package/adhdev.md) — 11.1K weekly downloads
- [react-slide-button](https://npm.io/package/react-slide-button.md) — 310 weekly downloads
- [better](https://npm.io/package/better.md) — 42 weekly downloads
- [react-native-swipe-image](https://npm.io/package/react-native-swipe-image.md) — 22 weekly downloads
- [nl.fokkezb.pulltorefresh](https://npm.io/package/nl.fokkezb.pulltorefresh.md) — 11 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2020-03-24
- 1.0.4 — 2019-11-23
- 1.0.3 — 2019-11-23
- 1.0.2 — 2019-11-10
- 1.0.1 — 2019-11-10

## README

# axialslider

Simple slider with two axes and buttons

## Installation

    npm i axialslider

## Usage

```javascript
import axialslider from 'axialslider';

window.addEventListener('load', function () {
    axialslider({
      class: 'yourclass', // CSS class name, default: axialslider
      color: '#19bd9a' // Also you can use rgba
      duration: 1000, // Default
      delay: 3000 // Default delay between slides
    });
});
```

Cross browser way provedes requestAnimationFrame:

```javascript
if ( !window.requestAnimationFrame ) {
  window.requestAnimationFrame = ( function() {
    return window.webkitRequestAnimationFrame ||
    window.mozRequestAnimationFrame ||
    window.oRequestAnimationFrame ||
    window.msRequestAnimationFrame ||
    function( /* function FrameRequestCallback */ callback, /* DOMElement Element */ element ) {
      window.setTimeout( callback, 1000 / 60 );
    };
  } )();
}
```

```html
<div class="yourclass">
  <div class="yourclass__slides">
    <div class="yourclass__slide">
      My Slide 1
    </div>
    <div class="yourclass__slide">
      My Slide 2
    </div>
  </div>
</div>
```

For vertical slider:
```html
<div class="yourclass yourclass_vertical">
  <div class="yourclass__slides">
    <div class="yourclass__slide">
      My Slide 1
    </div>
    <div class="yourclass__slide">
      My Slide 2
    </div>
  </div>
</div>
```

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

---
_Source: https://npm.io/package/axialslider · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
