Class · inherits UIComponent
UIStroke
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:
- Adjust the
ColorandThicknessof the stroke outline. - Change the stroke
Transparencyindependently from the text or UI object. - Choose the
LineJoinModeof the stroke (round, bevel, or miter). - Specify the
BorderStrokePositionon its parent's border and/or an additionalBorderOffsetto the stroke's position. - Add a gradient to the stroke via the
UIGradientinstance. - Use rich text tags to add stroke to inline text segments.
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
UIStrokeinstance 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
BorderStrokePositionvalue.Color
: Color3Determines the stroke color.Determines the
UIStrokecolor. You can also insert aUIGradientinstance as a child to create gradient strokes.Enabled
: booleanDetermines whether the stroke in visible.This property determines whether the
UIStrokeis visible. When set tofalse, the stroke will not be rendered. Defaults totrue.LineJoinMode
: LineJoinModeDetermines how corners are interpreted.This property determines how corners are interpreted. It accepts an
LineJoinModevalue of eitherRound(default),Bevel, orMiter.StrokeSizingMode
: StrokeSizingModeDetermines whether the stroke'sThicknesswill be measured in pixels or be relative to the parent.This property determines whether the stroke's
Thicknesswill be measured in pixels or be scaled relative to the parent. SeeStrokeSizingModefor 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
UIStrokeproperty 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'sBackgroundTransparencyorTextTransparency.This property sets the stroke opacity independently of the parent object's
BackgroundTransparencyorTextTransparency. 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 siblingUIStrokeinstances.This property determines the order in which the stroke renders relative to sibling
UIStrokeinstances. Those with a lowerZIndexrender under (behind) those with a higherZIndex.Note that the rendering order for
UIStrokeinstances with the sameZIndexis undefined. Do not apply multipleUIStrokeinstances with the sameZIndexif 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.