# react-fullscreen-carousel

> React fullscreen image carousel component for desktop and mobile

Latest version **1.0.5** (published 2024-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-fullscreen-carousel
pnpm add react-fullscreen-carousel
yarn add react-fullscreen-carousel
bun add react-fullscreen-carousel
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2024-12-30 |
| First published | 2023-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 47.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | miha53cevic |
| Maintainers | miha53cevic |
| Keywords | react-carousel, react-fullscreen-carousel |

## Links

- npm: https://www.npmjs.com/package/react-fullscreen-carousel
- Repository: https://github.com/miha53cevic/react-fullscreen-carousel
- Issues: https://github.com/miha53cevic/react-fullscreen-carousel/issues
- npm.io page: https://npm.io/package/react-fullscreen-carousel

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^18.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.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.0.5 (latest) — 2024-12-30
- 1.0.4 — 2023-02-19
- 1.0.3 — 2023-02-19
- 1.0.2 — 2023-02-18
- 1.0.1 — 2023-02-18
- 1.0.0 — 2023-02-18

## README

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Build](https://github.com/miha53cevic/react-fullscreen-carousel/actions/workflows/build.yaml/badge.svg)](https://github.com/miha53cevic/react-fullscreen-carousel/actions/workflows/build.yaml)
[![NPM publish](https://github.com/miha53cevic/react-fullscreen-carousel/actions/workflows/npm.yaml/badge.svg?event=release)](https://github.com/miha53cevic/react-fullscreen-carousel/actions/workflows/npm.yaml)
# react-fullscreen-carousel
React fullscreen image carousel component for desktop and mobile  
[Demo](https://react-fullscreen-carousel-demo.onrender.com/)

## Install
```bash
npm i react-fullscreen-carousel
```
or
```bash
yarn add react-fullscreen-carousel
```

## Example
```typescript
import React from 'react';
import { ReactFullscreenCarousel } from 'react-fullscreen-carousel';

const data = [
    { img: "https://picsum.photos/400", alt: "image" },
    { img: "https://picsum.photos/500", alt: "image" },
    { img: "https://picsum.photos/600", alt: "image" },
    { img: "https://picsum.photos/700", alt: "image" },
    { img: "https://picsum.photos/650", alt: "image" },
    { img: "https://picsum.photos/750", alt: "image" },
];

const MyComponent: React.FC = () => {

    const [open, setOpen] = React.useState(false);

    return (
        <main>
            {open ?
                <ReactFullscreenCarousel slides={data} handleClose={() => setOpen(false)} startSlideIndex={0} />
                : null
            }
            <button onClick={() => setOpen(true)}>Open images</button>
        </main>
    );
};

export default MyComponent;
```
## Example with custom buttons
```typescript
import React from 'react';
import { ReactFullscreenCarousel } from 'react-fullscreen-carousel';

const data = [
    { img: "https://picsum.photos/400", alt: "image" },
    { img: "https://picsum.photos/500", alt: "image" },
    { img: "https://picsum.photos/600", alt: "image" },
    { img: "https://picsum.photos/700", alt: "image" },
    { img: "https://picsum.photos/650", alt: "image" },
    { img: "https://picsum.photos/750", alt: "image" },
];

const MyComponent: React.FC = () => {

    const [open, setOpen] = React.useState(false);

    return (
        <main>
            {open ?
                <ReactFullscreenCarousel slides={data} handleClose={() => setOpen(false)} 
                    closeButtonElement={(onClick: () => void) => <MyCustomCloseButton onClick={onClick} />}
                    prevButtonElement={(onClick: () => void) => <MyCustomPrevButton onClick={onClick} />}
                    nextButtonElement={(onClick: () => void) => <MyCustomNextButton onClick={onClick} />}
                />
                : null
            }
            <button onClick={() => setOpen(true)}>Open images</button>
        </main>
    );
};

export default MyComponent;
```

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