Skip to main content

SettingsTreeFieldValue

type SettingsTreeFieldValue = object;

SettingsTreeFieldValue represents the value and input type of a settings field. The exact object properties depend on the input type.

Boolean Input

{
input: 'boolean';
value: boolean;
}

A checkbox input that can be either true or false.

Number Input

{
input: "number";
value: number;
min?: number;
max?: number;
step?: number;
precision?: number;
}

A numeric input field.

PropertyDescription
minOptional minimum value
maxOptional maximum value
stepOptional step size when incrementing/decrementing
precisionOptional number of decimal places to display

Select Input

{
input: 'select';
value: string | number | boolean;
options: {
value: string | number | boolean;
label: string;
}
[];
}

A dropdown select input with predefined options.

String Input

{
input: "string";
value: string;
placeholder?: string;
}

A single-line text input field.

PropertyDescription
placeholderOptional placeholder text

Text Input

{
input: "text";
value: string;
placeholder?: string;
rows?: number;
}

A multi-line text input field.

PropertyDescription
placeholderOptional placeholder text
rowsOptional number of rows to display

Toggle Input

{
input: 'toggle';
value: string | number;
options: {
value: string | number;
label: string;
}
[];
}

A set of toggle buttons with predefined options.

Vec2 Input

{
input: "vec2";
value: [number, number];
labels?: [string, string];
min?: number | [number, number];
max?: number | [number, number];
step?: number | [number, number];
precision?: number | [number, number];
}

An input for a 2D vector.

PropertyDescription
labelsOptional labels for each component
minOptional minimum value(s)
maxOptional maximum value(s)
stepOptional step size(s)
precisionOptional number of decimal places to display

Vec3 Input

{
input: "vec3";
value: [number, number, number];
labels?: [string, string, string];
min?: number | [number, number, number];
max?: number | [number, number, number];
step?: number | [number, number, number];
precision?: number | [number, number, number];
}

An input for a 3D vector.

PropertyDescription
labelsOptional labels for each component
minOptional minimum value(s)
maxOptional maximum value(s)
stepOptional step size(s)
precisionOptional number of decimal places to display

RGB Input

{
input: 'rgb';
value: [number, number, number];
}

A color picker for RGB values (red, green, blue). Values range from 0 to 1.

RGBA Input

{
input: 'rgba';
value: [number, number, number, number];
}

A color picker for RGBA values (red, green, blue, alpha). Values range from 0 to 1.

MessagePath Input

{
input: "message-path";
value: string;
validTypes?: readonly string[];
supportDatasets?: boolean;
}

An input for selecting a message path.

PropertyDescription
validTypesOptional array of valid message types
supportDatasetsOptional flag to enable dataset paths

Autocomplete Input

{
input: "autocomplete";
value: string;
items: string[];
placeholder?: string;
}

A text input with autocompletion suggestions.

PropertyDescription
itemsArray of autocomplete suggestions
placeholderOptional placeholder text