# @boxslider/angular

> Angular directives for BoxSlider

Latest version **1.2.0** (published 2022-03-13) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @boxslider/angular
pnpm add @boxslider/angular
yarn add @boxslider/angular
bun add @boxslider/angular
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2022-03-13 |
| First published | 2020-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 87.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Phil Parsons |
| Maintainers | p-m-p |
| Keywords | boxslider, angular, slider, directive, carousel, cube, 3D |

## Links

- npm: https://www.npmjs.com/package/@boxslider/angular
- Repository: https://github.com/boxslider/packages/angular
- npm.io page: https://npm.io/package/@boxslider/angular

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.0.0

## 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

- 1.2.0 (latest) — 2022-03-13
- 1.1.5 — 2021-12-07
- 1.1.4 — 2021-12-06
- 1.1.3 — 2021-12-06
- 1.1.2 — 2021-12-06
- 1.0.3 — 2020-07-02
- 1.0.2 — 2020-05-18
- 1.0.1 — 2020-05-18
- 1.0.0 — 2020-05-18

## README

BoxSlider Angular
=== 

Angular directives for the [BoxSlider](https://github.com/boxslider/slider) content 
slider.

Installation
---
```
npm install --save @boxslider/slider @boxslider/angular
```

Usage
---

Import the module for the slider you wish to use into your application module.

```typescript
@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    FadeSliderModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```

Add the directive to your slider HTML in the template.

```html
<div class="viewport">
  <div class="slider" bxlFadeSlider 
       [activeSlide]="activeSlide" 
       [autoScroll]="autoScroll"
       (beforeSlide)="handleBeforeSlide($event)"
       (afterSlide)="handleAfterSlide($event)">
    <div class="slide">One</div>
    <div class="slide">Two</div>
    <div class="slide">Three</div>
    <div class="slide">Four</div>
    <div class="slide">Five</div>
    <div class="slide">Six</div>
    <div class="slide">Seven</div>
    <div class="slide">Eight</div>
  </div>
</div>
```

Inputs
---

* `sliderOptions: BoxSliderOptions` See the BoxSlider [documentation](https://github.com/boxslider/slider#options)
  for the available options but note that there is no need to provide the `effect` option.
* `effectOptions: EffectOptions` The options for the effect in use. See the effect option 
  [documentation](https://github.com/boxslider/slider#effect-options) for detailed information.
* `activeSlide: number` use this input to control the visible slide at a zero based
  index. For instance setting this to 2 will show slide number 3. 
* `autoScroll: boolean` use this input to control if the slider is playing or paused.

Outputs
---

* `beforeSlide: EventData` Emits on the BoxSlider `before` event.
* `afterSlide: EventData` Emits on the BoxSlider `after` event.
* `played: void` Emits on the BoxSlider `play` event.
* `paused: void` Emits on the BoxSlider `paused` event.
* `destroyed: void` Emits on the BoxSlider `destroy` event when the component is
  destroyed during its lifecycle.

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