# unstyled-lightbox

> Simple Unstyled Modals and Lightbox for React

Latest version **0.1.0** (published 2021-12-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install unstyled-lightbox
pnpm add unstyled-lightbox
yarn add unstyled-lightbox
bun add unstyled-lightbox
```

## Health

**Score 30/100 (F)** — status: abandoned.

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-12-27 |
| First published | 2021-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | TheBoringDude |
| Maintainers | theboringdude |
| Keywords | unstyled-lightbox, lightbox, react-lightbox, react, unstyled component, modal, lightbox modal |

## Links

- npm: https://www.npmjs.com/package/unstyled-lightbox
- Repository: https://github.com/TheBoringDude/unstyled-lightbox
- Homepage: https://github.com/TheBoringDude/unstyled-lightbox#readme
- Issues: https://github.com/TheBoringDude/unstyled-lightbox/issues
- npm.io page: https://npm.io/package/unstyled-lightbox

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^17.0.2
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.2

## 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

- 0.1.0 (latest) — 2021-12-27
- 0.0.3 — 2021-10-27
- 0.0.2-1 — 2021-10-26
- 0.0.2 — 2021-10-26
- 0.0.1 — 2021-10-23

## README

# unstyled-lightbox

Simple Unstyled Modals and Lightbox

All of the components in this have no default stylings. Control is up to you, it is only positioned to fit well together.

## Components

- **BasicLightBox**

  A basic image lightbox. Animations are not tested if they are guaranteed to work.

  ```tsx
  import React, { useState } from 'react'
  import { BasicLightbox } from 'unstyled-lightbox'
  import Image from '../doggo.jpg'

  const Lightbox = () => {
    const [open, setOpen] = useState(false)

    return (
      <div>
        <BasicLightbox
          open={open}
          onClose={() => setOpen(false)}
          images={[{ src: Image, alt: '' }]}
          className="fixed w-full h-full bg-black/60 z-50 inset-0 flex items-center justify-center"
          containerClassname="z-50 flex items-center justify-between"
          overlayClassname="absolute h-full w-full z-30"
          arrowsClassName={{
            icons: '',
            buttons: 'h-6 w-6 text-white'
          }}
          imageClassName="mx-4"
        />
        <img onClick={() => setOpen(true)} src={Image} alt="" />
      </div>
    )
  }

  export default Lightbox
  ```

- SimpleModal

  A simple modal. Modal stacking is not yet tested and not guaranteed to work.

  ```tsx
  import React, { useState } from 'react'
  import { SimpleModal } from 'unstyled-lightbox'

  const SModal = () => {
    const [open, setOpen] = useState(false)

    return (
      <>
        <SimpleModal
          open={open}
          onClose={() => setOpen(false)}
          className="fixed w-full h-full bg-black/60 z-50 inset-0 flex items-center justify-center"
          overlayClassname="absolute h-full w-full z-30"
        >
          <div className="z-50">
            <h1 className="text-xl text-white">hello world</h1>
          </div>
        </SimpleModal>

        <button onClick={() => setOpen(true)}>open modal</button>
      </>
    )
  }

  export default SModal
  ```

##

#### &copy; 2021 | TheBoringDude - [License](./LICENSE)

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