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

https://github.com/ssi02014/react-thumbnail-generator

Simple React Thumbnail Generator Component 😄
https://github.com/ssi02014/react-thumbnail-generator

component components-library image react storybook thumbnail thumbnail-images

Last synced: 10 months ago
JSON representation

Simple React Thumbnail Generator Component 😄

Awesome Lists containing this project

README

          

# đŸ’ģ react-thumbnail-generator
English | [한ęĩ­ė–´](README-ko_kr.md) | [įŽ€äŊ“中文](README-zh_cn.md) | [æ—ĨæœŦčĒž](README-ja_jp.md)













## Overview 🎨
`react-thumbnail-generator` is a versatile React component that allows you to easily create and customize thumbnails directly in your web browser. With an intuitive interface and rich feature set, you can generate thumbnails for your projects without leaving your application.

https://github.com/user-attachments/assets/5d4f8c23-72c6-43ae-aa62-5c46ee0ddfc6


### Key Features
- đŸŽ¯ Simple drag & drop interface
- 🎨 Background color/image customization
- âœī¸ Text styling with multiple fonts and effects
- 📏 Flexible canvas sizing
- đŸ–ŧī¸ Multiple export formats (PNG, JPG, WebP)
- 🔧 Highly configurable positioning and appearance
- 📱 Desktop browser optimized
- 📱 Client-side only component


## Demo Page đŸ–ŧī¸
[react-thumbnail-generator demo page](https://ssi02014.github.io/react-thumbnail-generator/?path=/story/components-thumbnailgenerator--default)


## Version Compatibility 🔄
react-thumbnail-generator `v4` supports `react/react-dom v19`.

If you are using react v18, please use version `v3`.

```shell
yarn add react-thumbnail-generator@^3
```
```shell
pnpm add react-thumbnail-generator@^3
```
```shell
npm install react-thumbnail-generator@^3
```


## Quick Start 🚀
### STEP 1ī¸âƒŖ
- Install Package
```shell
yarn add react-thumbnail-generator
```
```shell
pnpm add react-thumbnail-generator
```

```shell
npm install react-thumbnail-generator
```


### STEP 2ī¸âƒŖ
- Add `` component.
- ThumbnailGenerator is automatically rendered as a `document.body` child by default using `Portal`.

```jsx
import ThumbnailGenerator from 'react-thumbnail-generator';

const App = () => {
return (

)
}
```


## How to add Web Fonts 😊
### STEP 1ī¸âƒŖ
- Add a web font in `public/index.html` or `index.html`
- Or import web fonts in your `CSS/SCSS` files

```html










```


### STEP 2ī¸âƒŖ
- Add font names as an array to the `additionalFontFamily` prop
- The font names must match exactly with the loaded web fonts

```jsx
import ThumbnailGenerator from 'react-thumbnail-generator';

const App = () => {
return (

)
}
```


## Options 📄
- iconPosition
- **Optional**
- Default: `bottom-right`
- Type:`top-left | top-right | bottom-left | bottom-right`
- modalPosition
- **Optional**
- Default: `right`
- Type:`left | right | center`
- additionalFontFamily
- **Optional**
- Type: `string[]`
- isFullWidth
- **Optional**
- Default: `false`
- Type: `boolean`
- isDefaultOpen
- **Optional**
- Default: `false`
- Type: `boolean`


## Contributing

Thank you for your contribution. â¤ī¸ Anyone can contribute to `react-thumbnail-generator`.




## License
MIT Š ssi02014. See [LICENSE](./LICENSE) for details.