npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-image-list-box

v0.1.2

Published

Image Annotation List Box

Downloads

9

Readme

react-image-list-box

📢 It is a react component where you can list your image files.

ezgif com-video-to-gif-converted

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)

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: ""
      },
]