# react-image-list-box

> Image Annotation List Box

Latest version **0.1.2** (published 2023-12-21) · 0 weekly downloads

## Install

```sh
npm install react-image-list-box
pnpm add react-image-list-box
yarn add react-image-list-box
bun add react-image-list-box
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2023-12-21 |
| First published | 2023-12-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 70.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kardelen Oglakcioglu |
| Maintainers | koglakk |
| Keywords | react, component, react-component, components, ui, image-list, image-box, annotation, image-classification, image-menu, image-annotation |

## Links

- npm: https://www.npmjs.com/package/react-image-list-box
- Repository: https+git://https://github.com/koglak/react-image-list-box
- Homepage: https://github.com/koglak/react-image-list-box
- npm.io page: https://npm.io/package/react-image-list-box

## Dependencies (11)

- [react](https://npm.io/package/react.md) ^18.2.0
- [bootstrap](https://npm.io/package/bootstrap.md) ^5.3.2
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.4
- [randomcolor](https://npm.io/package/randomcolor.md) ^0.6.2
- [react-icons](https://npm.io/package/react-icons.md) ^4.12.0
- [react-scripts](https://npm.io/package/react-scripts.md) 5.0.1
- [react-bootstrap](https://npm.io/package/react-bootstrap.md) ^2.9.1
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^13.4.0
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.17.0
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^13.5.0

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@progress/kendo-vue-listbox](https://npm.io/package/@progress/kendo-vue-listbox.md) — 932 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2023-12-21
- 0.1.1 — 2023-12-21
- 0.1.0 — 2023-12-20

## README

# react-image-list-box

 📢 It is a react component where you can list your image files.


![ezgif com-video-to-gif-converted](https://github.com/koglak/react-image-list-box/assets/24697147/9f0015a3-8176-4cab-818f-57362800b3a8)

## Getting Started

### Install

        npm install react-image-list-box

or

        yarn add --save react-image-list-box

### What We Offer?

* List your images
* Drop images from list
* Filter images by name
* Assign tags to your images
* Filter images by assigned tags
* Assign different types to your images (use imageTypes prop)
* Filter images by different types
* Arrange number of images per page
* Arrange image size on list
* Responsive box
* Select All and assign tags to all images
* Adjust colors of component by using Style props
* Click pictures and render a component based on your need

### Basic Usage

        import ImageBox from "react-image-list-box";

        const Example = () => {

          const [images, setImages] = React.useState(imagesData)
          const [filteredImages, setFilteredImages] = React.useState(images)
          
          return (
            <ImageBox
              images={images}
              setImages={setImages}
              filteredImages={filteredImages}
              setFilteredImages={setFilteredImages}
              perPage={10}
              imageWidth={200}
              imageHeight={200}
              boxWidth={"auto"}
              boxHeight={"auto"}
            />
          );
        };

### Props Usage


| **Prop** | **Type** | **Description** |
| --- | --- | --- |
| `images` | Array of Objects | Holds the data for images. |
| `setImages` | Function | Function to update the state of `images`. |
| `filteredImages` | Array of Objects | Holds the filtered data for images. |
| `setFilteredImages` | Function | Function to update the state of `filteredImages`. |
| `imageTypes` | Array of Objects | Defines the categories of images with names and icons. Each object in the array should have a `name` (string) and an `icon` (JSX element). |
| `onSearch` | Function | Function called when a search is performed. It should accept a search input string and filter images accordingly. |
| `onClickPage` | Function | Function to render a specific page or component when an image is clicked. It accepts parameters `showOnClickPage`, `setShowOnClickPage`, and `selectedImgObj`. |
| `perPage` | Number | Number of images to display per page. |
| `imageWidth` | Number | Width of each image in pixels. |
| `imageHeight` | Number | Height of each image in pixels. |
| `boxWidth` | String | Width of the image box container. Can be any valid CSS width value. |
| `boxHeight` | String | Height of the image box container. Can be any valid CSS height value. |
| `enableCheckBox` | Boolean | Determines whether checkboxes for images are enabled. |
| `enableDelete` | Boolean | Determines whether the delete functionality for images is enabled. |
| `enableTagAssignment` | Boolean | Determines whether the tag assignment functionality for images is enabled. |
| `selectedImgObj` | Object | The currently selected image object. |
| `setSelectedImgObj` | Function | Function to update the state of `selectedImgObj`. |
| `rootStyle` | Object | Style object for the root element of the component. Should contain valid CSS properties. |
| `buttonStyle` | Object | Style object for buttons in the component. |
| `badgeStyle` | Object | Style object for badges in the component. |
| `checkboxStyle` | Object | Style object for checkboxes in the component. |
| `inputStyle` | Object | Style object for input elements in the component. |
| `dropdownStyle` | Object | Style object for dropdown elements in the component. |

![ezgif com-video-to-gif-converted (1)](https://github.com/koglak/react-image-list-box/assets/24697147/938be744-1968-4810-82fb-d9c3aea79c11)

### Images Data Example


        export const imagesData = [
          {
              src: 'https://thumbor.forbes.com/thumbor/fit-in/900x510/https://www.forbes.com/advisor/wp-content/uploads/2023/07/top-20-small-dog-breeds.jpeg.jpg',
              filename: '1.jpg',
              categories: [],
              type: "",
              annotations: []
          },
          {
              src: 'https://hips.hearstapps.com/hmg-prod/images/dog-puppy-on-garden-royalty-free-image-1586966191.jpg?crop=0.752xw:1.00xh;0.175xw,0&resize=1200:*',
              filename: '2.jpg',
              categories: [],
              type: "",
              annotations: []
          },
          {
              src: 'https://upload.wikimedia.org/wikipedia/commons/thumb/9/90/Labrador_Retriever_portrait.jpg/1200px-Labrador_Retriever_portrait.jpg',
              filename: '3.jpg',
              categories: [],
              type: ""
          },
    ]

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