An open API service indexing awesome lists of open source software.

https://github.com/mdtanvirahamedshanto/react-image-section-mapper-demo


https://github.com/mdtanvirahamedshanto/react-image-section-mapper-demo

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# React Image Section Mapper Demo

A demo for showcasing the usage of `react-image-section-mapper`, a TypeScript React component for creating interactive, resizable, and draggable sections on images.

### Features:

- 🎯 Create clickable sections on images
- 🖱️ Drag & resize sections with handles
- 📱 Responsive design
- 🎨 Customizable themes
- 💾 Save & load section data
- 🔒 Read-only mode
- 🎛️ Minimum size constraints
- 🔢 Maximum sections limit
- 🪝 Event hooks for clicks and hovers

## Demo

You can see the demo in action by cloning the repository and running it locally.

## Installation

1. Clone the repository:

```bash
git clone https://github.com/yourusername/react-image-section-mapper-demo.git
cd react-image-section-mapper-demo
```

2. Install the dependencies:

```bash
npm install
```

3. Run the app locally:

```bash
npm start
```

This will open the demo app in your browser at [http://localhost:3000](http://localhost:3000).

## Usage

This demo shows how to use `react-image-section-mapper` to add resizable and draggable sections to an image.

### Example Code

The `ImageSectionMapperDemo.tsx` component demonstrates how to use the library in a simple app:

```tsx
import React from 'react';
import { ImageSectionMapper } from 'react-image-section-mapper';

const ImageSectionMapperDemo = () => {
const handleSave = (sections: any[]) => {
console.log('Saved sections:', sections);
// You can save sections to your backend here
};

return (


Image Section Mapper Demo




);
};

export default ImageSectionMapperDemo;