Skip to content

panGenerator/tweakpane-textarea-plugin

Repository files navigation

Textarea plugin for Tweakpane

Version

Simple textarea (multiline text input) plugin for Tweakpane.
image

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);
});