Tweakpane

String

addControl() provides a text field for a string property.

var params = {
  name: 'cocopon',
};
var pane = new Tweakpane();
pane.addControl(params, 'name');

Selector

If you want to choose a value from list, use addSelector() and pass a string list as values option.

var pane = new Tweakpane();
pane.addSelector(target, 'direction', {
  values: [
    'left',
    'up',
    'right'
    'down'
  ]
});

An object that has string values is also supported:

var pane = new Tweakpane();
pane.addSelector(target, 'vimKey', {
  values: {
    left:  'H',
    up:    'K',
    right: 'L',
    down:  'J'
  }
});