Parameters

Parameters are the inputs that users can modify on a design. They appear as form fields on the design page.

Defining a parameter

Each parameter is configured in the Parameters tab of the editor. You set:

  • ID — the variable name you use in your JS code (e.g. width)
  • Label — the text shown to the user
  • Type — see types below
  • Default value — the value used when the user has not changed it

Parameter form

There is no need to write a fallback in code — the default value is always guaranteed to be set before your script runs.

Using parameters in code

Parameter IDs are injected as plain JavaScript variables. Just use them directly:

// width, depth, height are defined in the Parameters tab
const result = box(width, depth, height);
// text parameter with ID "label", boolean with ID "hollow"
const t = await text(label, 2, { size: 10 });
const base = hollow ? hollow(box(60, 30, 8), 2) : box(60, 30, 8);
const result = base.sub(t.translate([-15, -5, 6]));

Parameter types

Type Description Example
number Numeric input Width, height, radius
text Free text input Label to engrave
select Dropdown list Style, shape
boolean Checkbox (true/false) Enable/disable a feature

For select, the value in your script is the key of the selected option (a string).

Grouping parameters

The Group field is purely for display — parameters with the same group name are shown together under a collapsible section title in the design page. It has no effect on the values or how they are accessed in code.

Parameter groups — display only

Ordering

Each parameter has an order field (integer). Lower values appear first. Use the ↑ ↓ arrows in the editor to reorder.