Skip to content

Class · inherits UIComponent

UIStroke

Official docs ↗

Applies an outline to text or a UI border.

About UIStroke

UIStroke applies an outline to text or a UI border. Some properties may require enabling the Improved UIStrokes beta.

Key features include:

For more details on the UIStroke object, see Appearance Modifiers.

Properties 10

  • ApplyStrokeMode: ApplyStrokeModeDetermines whether to apply the stroke to the object's border instead of the text itself.

    When a UIStroke instance is applied to a text object, this property determines whether to apply the stroke to the object's border instead of the text itself.

  • BorderOffset: UDimSpecifies an additional offset to the stroke's position, relative to the parent's minimum height or width.

    This property specifies an additional offset (UDim) to the stroke's position, relative to the parent's minimum height or width.

  • BorderStrokePosition: BorderStrokePositionDetermines the stroke's position on its parent's border.

    This property determines the stroke's position on its parent's border as an BorderStrokePosition value.

  • Color: Color3Determines the stroke color.

    Determines the UIStroke color. You can also insert a UIGradient instance as a child to create gradient strokes.

  • Enabled: booleanDetermines whether the stroke in visible.

    This property determines whether the UIStroke is visible. When set to false, the stroke will not be rendered. Defaults to true.

  • LineJoinMode: LineJoinModeDetermines how corners are interpreted.

    This property determines how corners are interpreted. It accepts an LineJoinMode value of either Round (default), Bevel, or Miter.

  • StrokeSizingMode: StrokeSizingModeDetermines whether the stroke's Thickness will be measured in pixels or be relative to the parent.

    This property determines whether the stroke's Thickness will be measured in pixels or be scaled relative to the parent. See StrokeSizingMode for further details.

  • Thickness: floatDetermines the stroke's thickness.

    This property determines the stroke's thickness, measured in pixels (default) or scaled relative to the parent, depending on StrokeSizingMode.

    Be mindful of tweening this UIStroke property when applied to text objects. This renders and stores many glyph sizes each frame, potentially causing performance issues or text flickering.

  • Transparency: floatSets the stroke opacity independently of the parent object's BackgroundTransparency or TextTransparency.

    This property sets the stroke opacity independently of the parent object's BackgroundTransparency or TextTransparency. This allows you to render text and borders that are "hollow" (consisting of only an outline).

  • ZIndex: intDetermines the order in which the stroke renders relative to sibling UIStroke instances.

    This property determines the order in which the stroke renders relative to sibling UIStroke instances. Those with a lower ZIndex render under (behind) those with a higher ZIndex.

    Note that the rendering order for UIStroke instances with the same ZIndex is undefined. Do not apply multiple UIStroke instances with the same ZIndex if their rendering order matters.

UIStroke also has every member of UIComponent. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.