# @types/react-swipeable-views

> TypeScript definitions for react-swipeable-views

Latest version **0.13.6** (published 2024-12-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-swipeable-views
pnpm add @types/react-swipeable-views
yarn add @types/react-swipeable-views
bun add @types/react-swipeable-views
```

## Health

**Score 55/100 (C)** — status: stable.

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

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

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.13.6 |
| Published | 2024-12-05 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 0.13.6 (latest) — 2024-12-05
- 0.13.5 (ts4.5) — 2023-11-07
- 0.13.2 (ts4.3) — 2023-06-12
- 0.13.1 (ts3.6) — 2021-07-07
- 0.13.0 (ts2.8) — 2019-03-02
- 0.12.1 (ts2.6) — 2018-02-12
- 0.12.0 (ts2.3) — 2017-06-30
- 0.0.27 (ts2.1) — 2017-01-23
- 0.0.26 (ts2.0) — 2016-09-19
- 0.13.4 — 2023-10-18
- 0.13.3 — 2023-09-27
- 0.12.2 — 2018-08-06
- 0.0.28 — 2017-06-23
- 0.0.25 — 2016-07-14
- 0.0.24-alpha — 2016-07-08
- … 8 more at https://npm.io/package/@types/react-swipeable-views/versions

## README

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

export type OnChangeIndexCallback = (index: number, indexLatest: number) => void;

export type OnTransitionEndCallback = () => void;

export type OnSwitchingCallback = (index: number, type: OnSwitchingCallbackTypeDescriptor) => void;

export type OnSwitchingCallbackTypeDescriptor = "move" | "end";

export type AxisType = "x" | "x-reverse" | "y" | "y-reverse";

export interface Actions {
    updateHeight: UpdateHeightAction;
}

export type ActionCallback = (actions: Actions) => void;

export type UpdateHeightAction = () => void;

export interface SpringConfig {
    duration: string;
    easeFunction: string;
    delay: string;
}

export interface SwipeableViewsProps extends Omit<React.HTMLProps<HTMLDivElement>, "action" | "ref"> {
    animateHeight?: boolean | undefined;
    animateTransitions?: boolean | undefined;
    axis?: AxisType | undefined;
    containerStyle?: React.CSSProperties | undefined;
    disabled?: boolean | undefined;
    /*
     * This is the config used to disable lazy loading, if true it will render all the views in first rendering.
     */
    disableLazyLoading?: boolean | undefined;
    enableMouseEvents?: boolean | undefined;
    hysteresis?: number | undefined;
    ignoreNativeScroll?: boolean | undefined;
    index?: number | undefined;
    onChangeIndex?: OnChangeIndexCallback | undefined;
    onSwitching?: OnSwitchingCallback | undefined;
    onTransitionEnd?: OnTransitionEndCallback | undefined;
    resistance?: boolean | undefined;
    style?: React.CSSProperties | undefined;
    slideStyle?: React.CSSProperties | undefined;
    springConfig?: SpringConfig | undefined;
    slideClassName?: string | undefined;
    threshold?: number | undefined;
    action?: ActionCallback;
}

export interface SwipeableViewsState {
    indexCurrent?: number | undefined;
    indexLatest?: number | undefined;
    isDragging?: boolean | undefined;
    isFirstRender?: boolean | undefined;
    heightLatest?: number | undefined;
    displaySameSlide?: boolean | undefined;
}

export default class SwipeableViews extends React.Component<SwipeableViewsProps, SwipeableViewsState> {}

````

### Additional Details
 * Last updated: Thu, 05 Dec 2024 19:32:25 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [Michael Ledin](https://github.com/mxl), and [Deividas Bakanas](https://github.com/DeividasBakanas).

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