There are five kinds of input: slider, buttons, number, checkbox and text. The array of inputs command should contain a dictionary for each input desired, with type set equal to one of these string values, followed by a comma-separated list of optional attributes. Entries in the array can also be arrays of inputs, following the logic of matrices, to allow for arbitrary arrangements.

All inputs have two additional string options: a name that is used to identify the input in subsequent code, and a label that appears next to the input. The label can be any valid HTML. Single letter labels are italicized by default.

All variables are assigned in code via the helper function

var x = getVariable( id, 'x' );

where 'x' is the name of the variable.


A slider input has four numeric options with default values

min0
max1
step.01
defaultmin

A buttons input has four additional options: an array of numbers or strings, an optional array of string labels, a value in the first array and a CSS string with default values

values[1,2,3]
labelsvalues
defaultvalues[0]
widthempty

A number input has three numeric options with default values

min0
max1
defaultmin

A checkbox input has a single additional option default, which can be set to either 'checked' or true to have the box initially checked.


The minimum and maximum values of slider and number inputs can be set via the helper function

setLimit( id, name, end, value );

where end is either 'min' or 'max'. This can be used to avoid invalid numerical input.