# react-glide

> A multi purpose carousel module built in React.

Latest version **5.1.0** (published 2026-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-glide
pnpm add react-glide
yarn add react-glide
bun add react-glide
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.1.0 |
| Published | 2026-05-18 |
| First published | 2017-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 17 |
| Author | andrewangelle |
| Maintainers | andrewangelle |
| Keywords | react, component |

## Links

- npm: https://www.npmjs.com/package/react-glide
- Repository: http://github.com/andrewangelle/react-glide.git
- npm.io page: https://npm.io/package/react-glide

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 5.1.0 (latest) — 2026-05-18
- 5.0.0-next.10 (next) — 2025-06-10
- 4.1.0-alpha.1 (alpha) — 2022-10-23
- 5.0.0 — 2025-06-19
- 5.0.0-next.9 — 2025-05-03
- 5.0.0-next.8 — 2025-04-10
- 5.0.0-next.7 — 2025-04-10
- 5.0.0-next.6 — 2025-04-02
- 5.0.0-next.5 — 2025-04-02
- 5.0.0-next.4 — 2025-03-28
- 5.0.0-next.3 — 2025-03-27
- 5.0.0-next.2 — 2025-03-27
- 4.1.1-next.1 — 2025-03-26
- 4.1.1-next.0 — 2025-03-25
- 4.1.0 — 2022-10-23
- … 12 more at https://npm.io/package/react-glide/versions

## README

# react-glide

A lightweight, zero-dependency, multi-purpose carousel component for React.

[![npm version](https://badge.fury.io/js/react-glide.svg)](https://badge.fury.io/js/react-glide)
[![CircleCI](https://circleci.com/gh/andrewangelle/react-paypal-button.svg?style=svg)](https://circleci.com/gh/andrewangelle/react-glide)

## Try it out

[Demo](https://master--676ed9a7f91611407c7878ce.chromatic.com/?path=/story/glide--basic)
<!-- [Codesandbox Demo](https://codesandbox.io/s/r7166733lm) -->

<img src="glide.png" width="400px" />

## Installation

```sh
$ npm install react-glide
```

## Usage

Glide functions as a wrapper and can be passed any type of element. See [example folder](https://github.com/andrewangelle/react-glide/tree/master/ssr-testing/components/GlideExample.tsx):

```javascript
import { Glide } from 'react-glide';

function Example() {
  return (
    <Glide {...props}>
      <img src='http:/path/to/image/url' />
      <img src='http:/path/to/image/url2' />
      <img src='http:/path/to/image1/url3' />
    </Glide>
  )
}
```

#### Note*
You will need to set dimensions on the container. You can do this in one of several ways...
- Via your own stylesheet on the parent element to the `<Glide />` component.
- Via your own stylesheet by passing a custom classname to `<Glide />`
- Via inline styles passed to the `containerStyles` prop on `<Glide />`  


## Options

### Types
```typescript
type GlideProps = {
  autoPlay?: boolean;
  autoPlaySpeed?: number;
  dots?: boolean;
  infinite?: boolean;
  className?: string;
  children?: string | JSX.Element | JSX.Element[];
  containerStyles?: CSSProperties;
  loading?: boolean;
  swipeable?: boolean;
  onSlideChange?: () => void;
};
```

## Styling

### Default Stylesheet

Import the default stylesheet from `react-glide`.

in your css file
```css
@import 'react-glide/lib/reactGlide.css';
/* or */
@import '~react-glide/lib/reactGlide.css';
```

or in your module
```javascript
import 'react-glide/lib/reactGlide.css';
```

#### CSS Variables

The values listed below are the defaults assigned when importing the library's stylesheet.
```css
:root {
  --react-glide-spinner-border: 2px solid #ccc;
  --react-glide-spinner-color: #333;
  --react-glide-button-background: hsl(190, 10%, 10%);
  --react-glide-button-color: hsl(190, 95%, 80%);
  --react-glide-dots-container-margin: 10px;
  --react-glide-dot-color: black;
  --react-glide-dot-selected-color: hsl(190, 95%, 80%);
  --react-glide-dot-gap: 8px;
  --react-glide-animation: fade 1s ease-in;
}
```

#### Element class names

```css
.glide--container {}
.glide--container.swipeable {}

.glide--item {}
.glide--item.animated {}
.glide--item.animated.current {}
.glide--item.swipeable {}
.glide--item.swipeable.current {}

.glide--button {}
.glide--button.next {}
.glide--button.previous {}

.glide--dots {}
.glide--dot {}
.glide--dot.active {}

.glide--loading {}
```

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