# tweakpane-image-plugin

> Image input plugin for Tweakpane

Latest version **1.1.3** (published 2021-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install tweakpane-image-plugin
pnpm add tweakpane-image-plugin
yarn add tweakpane-image-plugin
bun add tweakpane-image-plugin
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2021-09-19 |
| First published | 2021-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 28.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Florian Morel, Matheus Dias |
| Maintainers | metehus |
| Keywords | tweakpane, tweakpane-plugin, plugin, image-input |

## Links

- npm: https://www.npmjs.com/package/tweakpane-image-plugin
- npm.io page: https://npm.io/package/tweakpane-image-plugin

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2021-09-19
- 1.1.1 — 2021-09-19
- 1.1.0 — 2021-09-19

## README

# Tweakpane image plugin
Image input plugin for [Tweakpane][tweakpane].
![image](https://user-images.githubusercontent.com/22124518/133916776-a5340b89-025d-44a2-bdc3-87bd11b468db.png)


Check out the [demo][demo].

## Features
- Accepts images and URLs
- Image input
- Drag and drop
- Placeholders

## Installation
You can install [this package][npm-link] via NPM:
```sh
npm i tweakpane-image-plugin
```

## Usage

You can use this plugin using these parameters:
```ts
pane.addInput(params, 'url', {
  view: 'input-image';
  imageFit?: 'contain' | 'cover';
  extensions?: string[];
})
```

## Example

```js
import {Pane} from 'tweakpane';
import * as TweakpaneImagePlugin from 'tweakpane-image-plugin';

const pane = new Pane();
pane.registerPlugin(TweakpaneImagePlugin);

const params = {
  image: new Image(),
  placeholder: 'placeholder',
  url: 'https://images.unsplash.com/photo-1631875182291-17e8310183ed?q=80&w=500'
};

pane.addInput(params, 'image', {
  extensions: '.jpg, .gif',
})

pane.addInput(params, 'placeholder', {
  view: 'input-image'
})

pane.addInput(params, 'url', {
  view: 'input-image',
  imageFit: 'contain',
})
```

[tweakpane]: https://github.com/cocopon/tweakpane/
[npm-link]: https://www.npmjs.com/package/tweakpane-image-plugin
[demo]: https://tweakpane-image-plugin.netlify.app/

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