Skip to main content

Text

Renders a piece of text with typography controlled by a text style or explicit font parameters.

Text displays the string on its text input. Typography comes either from a project-wide textStyle (preferred, keeps the app consistent) or from explicit fontFamily/fontSize/color parameters that override it. Like all visual nodes it sits in the children hierarchy, has size/margin/alignment parameters, and reports basic interaction signals (onClick, hover) and geometry.

When to use it

Any static or data-bound text: headings, labels, list-item fields, error messages. Not for user-editable text (use net.noodl.controls.textinput) and not for button captions (the Button control has its own label).

At a glance

CategoryVisual
Type nameText
Available inbrowser
SSR compatibilitysafe
Provided bynoodl-viewer-react

Inputs

Values

NameTypeDefaultDescription
alignXEnum (left, center, right)Horizontal alignment of this element within the space its parent gives it
alignYEnum (top, center, bottom)Vertical alignment of this element within the space its parent gives it
asEnum (div, h1, h2, h3, h4, h5, h6, p, span)divHTML element to render the text as, which changes nothing visually but matters for screen readers and SEO
blockTouchBooleanStops every pointer event that lands here from reaching the nodes this one sits inside. Blunt: it takes hover and pointer-down with it, so reach for Click Bubbling first if it is only clicks you want to keep in
clickBubblingEnum (auto, always, never)autoWhether a click here also fires Click on the nodes this one sits inside. Automatic keeps it here as soon as this node's own Click is connected, so a button inside a clickable card runs the button and not the card; Always is the older behaviour where both run; Never keeps every click here, wired or not. Note that an element at zero opacity takes no pointer events at all
colorColorColour of the text itself, not of the element behind it
cssClassNameString``Extra CSS class names to put on this element, for styling from a stylesheet you supply
fontFamilyFontTypeface to render the text in, either a web-safe family name or a font file added to the project
fontSizeNumberHeight of the text, in pixels
heightDimension100Height of the element; how the value is read depends on Size Mode
letterSpacingNumberAutoExtra space added between characters; leave as Auto to use the spacing built into the font
lineHeightNumberAutoVertical space each line of text occupies; leave as Auto to follow the font
marginBottomNumberSpace outside the element's bottom edge, between it and its neighbours
marginLeftNumberSpace outside the element's left edge, between it and its neighbours
marginRightNumberSpace outside the element's right edge, between it and its neighbours
marginTopNumberSpace outside the element's top edge, between it and its neighbours
maxHeightNumberLargest height the element may grow to, taking priority over Height
maxWidthNumberLargest width the element may grow to, taking priority over Width
minHeightNumberSmallest height the element may shrink to, taking priority over Height
minWidthNumberSmallest width the element may shrink to, taking priority over Width
mixBlendModeEnum (normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity)normalHow this element's colours blend with whatever is painted behind it
mountedBooleantrueRemoves the element from the page entirely when false, unlike Visible which leaves its space behind
opacityNumber1How opaque this element is, from 0 for invisible to 1 for solid
pointerEventsEnabledBooleantrueWhen disabled, mouse and touch events pass through to whatever is behind this element
pointerEventsModeEnum (inherit, explicit)inheritWhether pointer handling is inherited from the parent or set explicitly on this element
positionEnum (relative, absolute, sticky, fixed)relativeHow the element is placed: In Layout follows its siblings, Absolute ignores them, Sticky pins to the parent edge on overflow, Fixed stays put and takes no space
sizeModeEnum (explicit, contentWidth, contentHeight, contentSize)contentHeightWhether Width and Height are used as given, or the element sizes itself to fit its contents
styleCssString/* background-color: red; */Raw CSS declarations applied to this element, overriding the styling ports above
textStringTextThe text to show; an empty value renders nothing rather than the words null or undefined
textAlignXEnum (left, center, right)leftAligns the text within its own box on the horizontal axis
textAlignYEnum (top, center, bottom)topAligns the text within its own box on the vertical axis, which is only visible when the box is taller than the text
textStyleTextStyleNoneApplies one of the project's saved text styles; the individual font ports below override whatever it sets
textTransformEnum (none, uppercase, lowercase, capitalize)noneForces the text to upper case, lower case or capitalised without changing the underlying value
transformOriginXNumber50Horizontal point the element rotates and scales around, as a fraction of its width
transformOriginYNumber50Vertical point the element rotates and scales around, as a fraction of its height
transformRotationNumber0Rotates the element clockwise in degrees, without affecting the layout
transformScaleNumber1Scales the element about its transform origin; 1 leaves it unscaled
transformXNumber0Moves the element right after layout, without moving its siblings
transformYNumber0Moves the element down after layout, without moving its siblings
variantStringName of a saved variant of this node type to apply, replacing the styling set here
visibleBooleantrueHides the element while keeping the space it occupies in the layout
widthDimension100Width of the element; how the value is read depends on Size Mode
wordBreakEnum (normal, break-all)normalWord break Control where line breaks are allowed - Normal: Break on spaces and other whitespace characters - Break All: Allow line breaks between any two characters, including inside words
zIndexNumberPaint order among overlapping siblings; higher numbers paint on top

Outputs

Values

NameTypeDefaultDescription
boundingHeightNumberHeight this element actually ended up with after layout, in pixels
boundingWidthNumberWidth this element actually ended up with after layout, in pixels
childIndexNumberThis element's position among its parent's children, counting from 0
screenPositionXNumberDistance in pixels from the left edge of the window to this element's left edge
screenPositionYNumberDistance in pixels from the top edge of the window to this element's top edge
thisReferenceA reference to this node itself, for ports that take a node rather than a value

Signals

NameTypeDefaultDescription
didMountSignalFires once this element has been added to the page and can be measured
hoverEndSignalFires when the pointer leaves this element
hoverStartSignalFires when the pointer moves over this element or any of its children
onClickSignalFires when this element is clicked or tapped
pointerDownSignalFires when a mouse button is pressed or a finger touches this element
pointerEnterSignalFires when the pointer moves onto this element, not counting its children
pointerUpSignalFires when the mouse button is released or the finger lifts over this element
willUnmountSignalFires just before this element is removed from the page, while it still exists

Dynamic ports

This node's port list changes at runtime (declared-port-groups); the tables above may be incomplete for a given instance.

Declares conditional/expandable port groups whose visibility depends on parameter values (see declaredPortGroups).

ConditionInputs shownOutputs shown
sizeMode = explicit OR sizeMode = contentHeight OR sizeMode NOT SETwidth
sizeMode = explicit OR sizeMode = contentWidthheight
pointerEventsMode = explicitpointerEventsEnabled

Ports at runtime

Text's ports are conditional on parameter values (declared-port-groups): explicit width/height ports appear only in the matching size mode, and advanced text ports depend on chosen options. Treat the catalog's list as the superset the editor filters contextually.

Patterns

  • Bind text from Component Inputs inside a Repeater item component to show per-record fields.
  • Drive visible from a Condition's result/isfalse for inline error or empty-state messages.

Examples

List page: Repeater fed by Query Records

The canonical data-list shape. Query Records (DbCollection2) fetches a database class and exposes the result on its items array output; the Repeater (For Each) consumes that array and instantiates its template component once per record. Each record's properties are delivered to the item component through Component Inputs whose names match the record's property names — the item component reads them like any other input. The Repeater and its item template component are separate components by design.

Validate an input before acting on a click

The idiomatic gate shape: a Button click does not act directly — it evaluates a Condition. The Condition's boolean comes from an Expression that checks the text input's current value, so the same click either proceeds (ontrue) or reveals an error message (isfalse drives the error Text's visibility as a level, not a pulse). Note the two kinds of flow: text/booleans are values, onClick/eval/ontrue are momentary signals.

Group, Text Input, String Format, Label

Generated

This page is generated from node-catalog-enriched.json. Do not edit it by hand — run npm run docs:nodes to regenerate, and fix the source enrichment instead.