Node Types
Treege provides three node types, each serving a specific purpose when building a flow.
| Type | type value | Purpose |
|---|---|---|
| Input | "input" | Collect user input (16 input types + validation) |
| UI | "ui" | Display-only elements (title, divider) |
| Group | "group" | Organize nodes into a navigable step |
Input Node
Form fields that collect user input. Supports 16 input types with validation and conditional logic.
Supported input types (set via the type field):
- Text inputs:
text,password,number,textarea - Selection:
select,radio,checkbox,autocomplete - Boolean:
switch - Date/Time:
date,daterange,time,timerange - Files:
file - Location:
address - API integration:
http - Other:
hidden,submit
Common properties (data):
type: The input type (one of the values above)name: Field name used for submission (falls back tolabel, then nodeid)label: Field label (string or multi-language object)required: Whether the field is requiredpattern: Regex pattern for validationerrorMessage: Custom error message shown on validation failureplaceholder: Placeholder texthelperText: Helper text shown under the fieldoptions: Options forselect/radio/checkbox/autocompletemultiple: Allow multiple selections / files (forselect,checkbox, andfile)defaultValue: Default value configuration (static or referenced from another field)httpConfig: API configuration (used withtype: "http")optionsSource: Dynamic option list fetched from an HTTP endpoint
{
id: "email",
type: "input",
data: {
type: "text",
name: "email",
label: "Email Address",
required: true,
pattern: "^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$",
placeholder: "you@example.com",
errorMessage: "Please enter a valid email"
}
}Options
Option-based inputs (select, radio, checkbox, autocomplete) take an options array:
{
id: "country",
type: "input",
data: {
type: "select",
name: "country",
label: "Country",
options: [
{ value: "fr", label: "France" },
{ value: "us", label: "United States" }
]
}
}Each option is { value: string; label: Translatable; description?: Translatable; disabled?: boolean; image?: string }.
UI Node
Display-only elements that don't collect input.
Properties (data):
type: The UI element type —"title"or"divider"label: Content to display (used bytitle)
{
id: "welcome",
type: "ui",
data: {
type: "title",
label: "Welcome to Our Survey"
}
}Supported UI types:
title— a heading/section titledivider— a visual separator between sections
Group Node
A container that organizes related nodes together. Groups are also what turn a flow into a multi-step form: at runtime, each contiguous slice of visible nodes sharing the same group becomes one navigable step with Back/Continue controls.
Properties (data):
label: Group title (string or multi-language object) — shown as the step heading
{
id: "personal-info",
type: "group",
data: {
label: "Personal Information"
}
}Child nodes belong to a group by referencing it as their parentId (the standard React Flow parent/child relationship), not via a children array.
Note: Earlier versions exposed a separate "Flow" node for navigation. Navigation is now handled automatically — group nodes drive step navigation, and conditional edges drive branching. See Conditional Logic.