@pangenerator/tweakpane-textarea-plugin
v2.0.0
Published
Textarea plugin for Tweakpane
Downloads
1,429
Readme
Textarea plugin for Tweakpane
Simple textarea (multiline text input) plugin for Tweakpane.
Installation
NPM
npm i @pangenerator/tweakpane-textarea-plugin
Browser
<script src="tweakpane.min.js"></script>
<script src="tweakpane-textarea-plugin.min.js"></script>
<script>
const pane = new Tweakpane.Pane();
pane.registerPlugin(TweakpaneTextareaPlugin);
</script>
Package
import {Pane} from 'tweakpane';
import * as TextareaPlugin from '@pangenerator/tweakpane-textarea-plugin';
const pane = new Pane();
pane.registerPlugin(TextareaPlugin);
Usage
const params = {
prop: 'Put your\nmultiline\ntext here!'
};
pane.addBinding(params, 'prop', {
view: 'textarea',
rows: 6,
placeholder: 'Type here...'
}).on('change', (ev) => {
console.log(ev.value);
});