# fslightbox-react

> A capable React component for displaying images, videos, or, through custom sources, anything you want in a full-window overlying box.

Latest version **2.1.1** (published 2026-08-21) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 53/100 (C)** — status: active.

Positive: has types package; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2026-08-21 |
| First published | 2019-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/fslightbox-react) |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 64.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 170 |
| Author | Piotr Zdziarski |
| Maintainers | piotrzdziarski |
| Keywords | react fslightbox, react lightbox, react slide gallery, react modal, fslightbox react |

## Links

- npm: https://www.npmjs.com/package/fslightbox-react
- Repository: https://github.com/banthagroup/fslightbox-react
- Homepage: https://fslightbox.com/
- Issues: https://github.com/banthagroup/fslightbox-react/issues
- npm.io page: https://npm.io/package/fslightbox-react

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [post-robot](https://npm.io/package/post-robot.md) — 93.7K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads

## Recent versions

- 2.1.1 (latest) — 2026-08-21
- 2.1.0 — 2026-08-06
- 2.0.3 — 2026-02-14
- 2.0.2 — 2026-01-08
- 2.0.0 — 2025-08-19
- 1.8.0 — 2025-03-13
- 1.7.6 — 2023-06-17
- 1.7.4 — 2023-04-20
- 1.7.3 — 2023-04-17
- 1.7.2 — 2023-02-16
- 1.7.0 — 2023-02-06
- 1.6.3 — 2023-01-16
- 1.6.2-2 — 2021-08-03
- 1.6.2 — 2021-01-03
- 1.6.1 — 2020-12-28
- … 40 more at https://npm.io/package/fslightbox-react/versions

## README

# React Fullscreen Lightbox Basic

## Description
A React component for displaying images, videos, or, through custom sources, anything you want in a clean overlying box.
The project's website: https://fslightbox.com.

| Dependency | Version |
| --- | --- |
| react | at least 16.8.0 |
| react-dom | at least 16.8.0 |

## Installation
### Through a package manager
```
npm install fslightbox-react
```
### Or, through an archive downloaded from the website
The .tgz archive, in its entirety, should be put somewhere in the end project, for example, "./src/lib". Then run the package manager's install command with the path to that archive. The command have to be run from the directory where your project's "package.json" file is.
``` 
$ npm install ./src/lib/[lightbox archive name] 
```
For example:
``` 
$ npm install ./src/lib/fslightbox-react-1.0.0.tgz
```

## Basic usage 
```jsx
import React, { useState } from "react";
import FsLightbox from "fslightbox-react";

function App() {
	// To open the lightbox change the value of the "toggler" prop.
	const [toggler, setToggler] = useState(false);

	return (
		<>
			<button onClick={() => setToggler(!toggler)}>
				Open the lightbox.
			</button>
			<FsLightbox
				toggler={toggler}
				sources={[
					'https://i.imgur.com/fsyrScY.jpg',
					'https://www.youtube.com/watch?v=xshEZzpS4CQ',
					'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'
				]}
			/>
		</>
	);
}

export default App;
```

## Documentation
Available at: https://fslightbox.com/react/documentation.

## Demo
Available at: https://fslightbox.com/react.


## Browser Compatibility
| Browser | Works? |
| --- | --- |
| Chrome | Yes |
| Firefox | Yes |
| Safari | Yes |
| Edge | Yes |
| IE 11 | Yes |

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