Text Node

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.

Properties

Visible

ProptextNode.isVisible
Typeboolean
Default{{true}}

Whether or not this node is visible.

Enabled

ProptextNode.isEnabled
Typeboolean
Default{{true}}

Whether or not this node is enabled.

Tooltip

ProptextNode.tooltip
Typestring
Defaultundefined

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

Top

ProptextNode.top
Typestring
Default1

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

Left

ProptextNode.left
Typestring
Default1

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

Width

ProptextNode.width
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 must be specified using CSS units (e.g. 100px or 100%).

Min Width

ProptextNode.minWidth
Typestring
Defaultnone

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

Max Width

ProptextNode.maxWidth
Typestring
Defaultnone

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

Height

ProptextNode.height
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 must be specified using CSS units (e.g. 100px or 100%).

Min Height

ProptextNode.minHeight
Typestring
Defaultnone

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

Max Height

ProptextNode.maxHeight
Typestring
Defaultnone

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

Overflow

ProptextNode.overflow
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

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

Overflow X

ProptextNode.overflowX
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

ProptextNode.overflowY
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

ProptextNode.styles
Typestring
Defaultelement.styles { }

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

Value

ProptextNode.value
Typestring
DefaultHello world

The text value to display.

Render Mode

ProptextNode.renderMode
TypeTextRenderingMethod ('text' | 'markdown' | 'link')
Defaulttext

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

Link

ProptextNode.href
Typestring
Defaultundefined

The URL this node will link to.

Show External Indicator

ProptextNode.showExternalIndicator
Typeboolean
Default{{false}}

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

Target

ProptextNode.target
TypeLinkTargetMethod ('_self' | '_blank' | '_parent' | '_top')
Default_self

Specify the context in which the linked resource will open.

Font Size

ProptextNode.fontSize
TypeFontSize ('xs' | 'sm' | 'md' | 'lg' | 'xl')
Defaultmd

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

Text Align

ProptextNode.textAlign
TypeTextAlignment ('left' | 'center' | 'right')
Defaultleft

The horizontal alignment of the text within the node.

Vertical Align

ProptextNode.verticalAlign
TypeVerticalAlignment ('top' | 'center' | 'bottom')
Defaulttop

The vertical alignment of the text within the node.

Font Weight

ProptextNode.fontWeight
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

ProptextNode.fontStyle
TypeFontStyle ('normal' | 'italic' | 'oblique')
Defaultnormal

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

Text Decoration

ProptextNode.textDecorationLine
TypeTextDecoration ('none' | 'underline' | 'line-through')
Defaultnone

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

Text Color

ProptextNode.color
Typestring
Defaulttext.primary

The color of the text.