# @types/react-motion-slider

> TypeScript definitions for react-motion-slider

Latest version **0.4.13** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-motion-slider
pnpm add @types/react-motion-slider
yarn add @types/react-motion-slider
bun add @types/react-motion-slider
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.4.13 |
| Published | 2023-11-07 |
| First published | 2016-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-motion-slider
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-motion-slider
- npm.io page: https://npm.io/package/@types/react-motion-slider

## Dependencies (2)

- [@types/react](https://npm.io/package/@types/react.md) *
- [@types/react-motion](https://npm.io/package/@types/react-motion.md) *

## Recent versions

- 0.4.13 (latest) — 2023-11-07
- 0.4.11 (ts3.7) — 2021-10-15
- 0.4.10 (ts3.6) — 2021-07-08
- 0.4.9 (ts2.8) — 2018-08-06
- 0.4.8 (ts2.6) — 2018-02-12
- 0.4.7 (ts2.3) — 2017-06-23
- 0.4.6 (ts2.1) — 2017-01-23
- 0.4.5 (ts2.0) — 2016-11-21
- 0.4.12 — 2023-10-18
- 0.4.4 — 2016-09-19
- 0.4.3 — 2016-08-25
- 0.4.2 — 2016-08-19
- 0.4.1 — 2016-08-02

## README

# Installation
> `npm install --save @types/react-motion-slider`

# Summary
This package contains type definitions for react-motion-slider (https://github.com/souporserious/react-motion-slider).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-motion-slider.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-motion-slider/index.d.ts)
````ts
declare module "react-motion-slider" {
    import * as React from "react";
    import { OpaqueConfig } from "react-motion";

    export interface SliderProps {
        children?: React.ReactNode;
        /**
         * Move to a slide by its key.
         */
        currentKey?: string | number | undefined;
        /**
         * Move to a slide by its index.
         */
        currentIndex?: number | undefined;
        /**
         * The amount of slides shown in view
         * @default 1
         */
        slidesToShow?: number | undefined;
        /**
         * The amount of slides to move upon using prev and next methods.
         * @default 1
         */
        slidesToMove?: number | undefined;
        /**
         * Animates the wrapper height to fit the current slide.
         * @default false
         */
        autoHeight?: boolean | undefined;
        /**
         * Offsets the slide to align either left, center, or right.
         * @default "left"
         */
        align?: "left" | "center" | "right" | undefined;
        /**
         * Enable touch and/or mouse dragging
         * @default true
         */
        swipe?: boolean | "touch" | "mouse" | undefined;
        /**
         * The amount the user must swipe to advance slides. (sliderWidth * swipeThreshold)
         * @default 0.5
         */
        swipeThreshold?: number | undefined;
        /**
         * The amount of time in milliseconds that determines if a swipe was a flick or not.
         */
        flickTimeout?: number | undefined;
        /**
         * Accepts a React Motion spring config.
         */
        springConfig?: OpaqueConfig | undefined;
        /**
         * Prop callback fired before slide change.
         * @param currentIndex
         * @param nextIndex
         */
        beforeSlide?: ((currentIndex: number, nextIndex: number) => void) | undefined;
        /**
         * Prop callback fired after slide change.
         * @param currentIndex
         */
        afterSlide?: ((currentIndex: number) => void) | undefined;
    }

    export default class Slider extends React.Component<SliderProps> {
        /**
         * Moves to next slide
         */
        public next(): void;

        /**
         * Move to previous slide
         */
        public prev(): void;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react), [@types/react-motion](https://npmjs.com/package/@types/react-motion)

# Credits
These definitions were written by [Alexey Svetliakov](https://github.com/asvetliakov).

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