Reference
Nodes
Components
Text

Text Component

Text is a fundamental building block of web applications. Use text to display content inline in your app.

Text can be formatted as plaintext or using Markdown (opens in a new tab).

Properties

Visible

PropisVisible
Typeboolean
Defaulttrue

Whether or not this node is visible.

Enabled

PropisEnabled
Typeboolean
Defaulttrue

Whether or not this node is enabled.

Tooltip

Proptooltip
Typestring
Defaultundefined

The tooltip text to display when hovered or focused over this node.

Top

Proptop
Typenumber
Default1

The position of the node from the top side of the grid (grid-row-start).

Left

Propleft
Typenumber
Default1

The position of the node from the left side of the grid (grid-column-start).

Width

Propwidth
Typestring
Default128px

The width of the node. When this node is in a grid layout, this should be done using unitless grid column units (specifying 4 will become grid-column-end: span 4). When this node is in a stack layout, the width can be specified using CSS units (e.g. 100px or 100%), or be left unitless to be treated as flex-grow for the node.

Min Width

PropminWidth
Typestring
Defaultundefined

The minimum width of the node. When this node is in a grid layout, this property is ignored.

Max Width

PropmaxWidth
Typestring
Defaultundefined

The maximum width of the node. When this node is in a grid layout, this property is ignored.

Height

Propheight
Typestring
Default32px

The height of the node. When this node is in a grid layout, this should be done using unitless grid row units (specifying 4 will become grid-row-end: span 4). When this node is in a stack layout, the height can be specified using CSS units (e.g. 100px or 100%), or be left unitless to be treated as flex-grow for the node.

Min Height

PropminHeight
Typestring
Defaultundefined

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Max Height

PropmaxHeight
Typestring
Defaultundefined

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Overflow

Propoverflow
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultvisible

The strategy used to handle overflow in the horizontal and vertical axes for content that is larger than its container.

Overflow X

PropoverflowX
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal axis for content that is larger than its container.

Overflow Y

PropoverflowY
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the vertical axis for content that is larger than its container.

Custom Styles

Propstyles
Typestring
Default::component { }

Custom CSS styles to be applied to the node. Use element.styles to refer to the current node.

Object Fit

PropobjectFit
TypeObjectFit ('none' | 'contain' | 'cover' | 'fill' | 'scale-down')
Defaultcover

The strategy used to set how the content of a replaced element should be resized to fit its container.

Value

Propvalue
Typestring
DefaultHello world

The text value to display.

Render Mode

ProprenderMode
TypeTextRenderingMethod ('text' | 'markdown' | 'link')
Defaulttext

How to render value. If text or link, plaintext formatting is used. If markdown, Markdown formatting is used.

Link

Prophref
Typestring
Defaultundefined

The URL this node will link to.

Show External Indicator

PropshowExternalIndicator
Typeboolean
Defaultfalse

Show an arrow icon when the link points to an external resource.

Target

Proptarget
TypeLinkTargetMethod ('_self' | '_blank' | '_parent' | '_top')
Default_self

Specify the context in which the linked resource will open.

Font Size

PropfontSize
TypeFontSize ('xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl')
Defaultmd

The font size of the text. This can either be CSS measurement values like 12px or theme tokens like md.

Line Height

ProplineHeight
Typestring
Default1.2

The vertical distance between lines of text.

Text Align

ProptextAlign
TypeTextAlignment ('left' | 'center' | 'right')
Defaultleft

The horizontal alignment of the text within the node.

Vertical Align

PropverticalAlign
TypeVerticalAlignment ('top' | 'center' | 'bottom')
Defaultcenter

The vertical alignment of the text within the node.

Font Weight

PropfontWeight
TypeFontWeight ('normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900')
Defaultnormal

The degree of boldness or lightness of the font used to display the text. Higher numbers mean more bold.

Font Style

PropfontStyle
TypeFontStyle ('normal' | 'italic' | 'oblique')
Defaultnormal

The style (such as italic or oblique) of the font used to display the text.

Text Decoration

ProptextDecorationLine
TypeTextDecoration ('none' | 'underline' | 'line-through')
Defaultnone

The decoration (such as underline or line-through) to be used to display the text.

Text Color

Propcolor
Typestring
Defaulttext.primary

The color of the text.

Text Overflow

ProptextOverflow
TypeTextOverflow ('none' | 'clip' | 'ellipsis')
Defaultnone

The overflow strategy (such as ellipsis) that will be used when displaying the text.

Event Handlers

On Click

HandlertextNode.onClick

Called when the user clicks the node. Use this event to trigger downstream actions when this node is clicked.

On Double Click

HandlertextNode.onDoubleClick

Called when the user double clicks the node. Use this event to trigger downstream actions when this node is double clicked.

On Hover

HandlertextNode.onHover

Called when the user hovers on the node. Use this event to trigger downstream actions when this node is hovered.

On Leave

HandlertextNode.onLeave

Called when the user is not hovering over the node. Use this event to trigger downstream actions when this node is no longer hovered.