Skip to content

TextLabel ​

Displays text. Maps to Roblox TextLabel.

luau
PeanutUI.TextLabel {
    text = "Hello",
    textSize = 18,
}

Properties ​

In addition to the shared widget properties:

PropertyTypeDescription
textstringDisplayed text.
textColorColor3Text color.
textTransparencynumberText transparency.
textStrokeColorColor3Stroke color.
textStrokeTransparencynumberStroke transparency.
fontFaceFontFont face.
textSizenumberFont size.
textScaledbooleanScale text to fit.
textWrappedbooleanWrap text.
textXAlignmentEnum.TextXAlignmentHorizontal alignment.
textYAlignmentEnum.TextYAlignmentVertical alignment.
richTextbooleanEnable rich text tags.
lineHeightnumberLine height multiplier.
maxVisibleGraphemesnumberMax visible graphemes.
textTruncateEnum.TextTruncateTruncation mode.

Events ​

TextLabel uses the shared widget events with no additions.