Info

User Interface Nodes

Build interactive views with UI nodes.

There are several nodes to create custom UI. The type that flows in these wires is called View.

The View type is a bit different from other value types, it’s interactive, and can change based on user input.

Control Nodes

User Interface Nodes — step 1

Button Node

The Button node has one inlet and two outlets. The inlet is the label view for the button, this can be a text Label or any view. The outlets are the button view itself and an action, that is triggered on button release.

User Interface Nodes — step 2User Interface Nodes — step 3

Slider Node

The Slider node has one main inlet for the slider value, and a minimum and maximum inlet for the range of values. The Value inlet is a binding inlet, meaning it can get and set values, it can update values upstream.

It’s recommended to connect the Slider’s Value inlet to a State Float node, to then pass the value downstream.

Layout Nodes

User Interface Nodes — step 4

Vertical & Horizontal Nodes

The Vertical and Horizontal nodes allow stacking views next to each other.

User Interface Nodes — step 5

Layers Node

The Layers node allow depth stacking views in the Z axis.

Vector and Graphics

User Interface Nodes — step 6

The Clip Vector node allows to clip a view with a vector shape. In this example we’re converting a Graphic node to a interface compatible view type.

User Interface Nodes — step 7

Note that the Capsule node’s size is 100% flex in both width and height. This allows the Clip Vector node to derive it’s shape size based on the aspect ratio from the image.

Gestures

Gesture nodes need a view to perform the gesture on, so it’s recommended that the first thing to do is to wire in a view on which the gesture will be recognized on.

User Interface Nodes — step 8

Tap Node

The Tap gesture node will send an action on tap along with the location.

User Interface Nodes — step 9

Drag Node

The Drag gesture node allow interaction on a view.

User Interface Nodes — step 10

Key Press Node

The Key Press node detects key presses.

It’s required that a view in the hierarchy is in focus to detect key presses.

Here’s what the focus indicators look like:

User Interface Nodes — step 11User Interface Nodes — step 12