Style Editor

The built-in Style Editor is a comprehensive tool that allows you to create, manage, and apply UI styles for Roblox experiences through a combination of tokens, design sheets, style rules, and themes.

Access the Style Editor via the UI tab (if it isn't visible, access it from the Home tab).

Style Editor tool indicated in UI tab of Studio toolbar

Once open, click the Create Design button to generate a base style set.

Create Design button in opening dialog of Style Editor.

Style tokens

Style tokens, defined through attributes of a token StyleSheet, represent UI property variables that can be used across styles and components; for example, there could be a common color for a Frame.BackgroundColor3, TextLabel.TextColor3, and UIStroke.Color. Tokens are comparable to CSS variables.

  1. Create a new token style sheet:

    1. In the left column of the Style Editor, hover over Tokens, click the , and select New Token StyleSheet.
    2. Rename the new sheet to TokenSheet.
    New token sheet created in Style Editor.
  2. With the new token sheet selected, create several tokens by clicking Add a Token… in the main panel. These tokens will be used throughout this guide for both rules and themes.

    Token NameTypeValue
    GoldColor3#ffcc00
    MagentaColor3#ff0099
    OrangeColor3#dd6030
    OswaldFontOswald
    Rad20UDim0, 20
    RectLUDim20, 300, 0, 160
    SquareLUDim20, 200, 0, 200
    Text24number24
    Text32number32
    Tokens added to TokenSheet in Style Editor.

Design sheets

A design style sheet aggregates style rules and can be linked to DataModel trees to apply style properties to UI instances. Only one StyleSheet can apply to a given tree, although you can use themes to swap related styles across your UI, a concept covered later in this guide.

A prepopulated design sheet named StyleSheet is created via the Create Design button. It contains class rules for common UI objects such as Frame and TextLabel. It also contains two StyleDerive instances which derive (inherit) tokens and styles from the base style sheet for use in your custom styling configurations.

Initial configuration of design sheet in Style Editor.

Once you have a design sheet, you can set up a test on‑screen container to use with the Style Editor, or an in‑experience container if desired.

  1. Hover over StarterGui in the Explorer and insert a ScreenGui.

  2. Confirm that a new StyleLink instance appears under the ScreenGui with its StyleSheet property set to the StyleSheet design sheet.

Style rules

Style rules apply to every instance that matches the rule's Selector definition to match characteristics such as class name, instance tag, and hierarchy relationships. At a high level, instance matching and modification via a rule's Selector definition operates through:

Class rule

A style class selector targets all instances of a given UI class. The following rule setup styles all Frames with a uniform background color and size.

  1. In the left column of the Style Editor, select Frame in the UI Elements branch.

    Default class style in the Style Editor.
  2. Link two previously created style tokens to two Frame properties:

    PropertyStyle Token
    BackgroundColor3$Magenta
    Size$SquareL
    1. Click Add a Property… in the main panel and select the necessary property. Note that you can type keywords to more quickly find properties in the dropdown menu.
    2. Instead of entering a static value, click the button and select Link Token.
    3. Click the $ which appears in the value field and select the proper associated token.

    Token linking workflow diagrammed in the Style Editor.
    Class rule configured with tokens in the Style Editor.
  3. Insert a new Frame into the ScreenGui you previously created and linked. The styles you defined should automatically apply to it.

    Final styled class rule in the Style Editor.

Tag rule

Instance tag selectors target specific UI objects tagged through CollectionService. The following rule setup styles a TextButton tagged as ButtonPrimary with a custom background color, font, and text size.

  1. In the left column of the Style Editor, hover over the StyleSheet sheet, click the button, and navigate through to New ⟩ Tag.

    Creation of tag rule in the Style Editor.
  2. Rename the new tag rule .ButtonPrimary (note the leading .).

    Tag rule renamed in the Style Editor.
  3. Link three previously created style tokens to three TextButton properties:

    PropertyStyle Token
    BackgroundColor3$Gold
    FontFace$Oswald
    TextSize$Text32
    1. Click Add a Property… in the main panel and select the necessary property. Remember that you can type keywords to more quickly find properties in the dropdown menu.
    2. Instead of entering a static value, click the button and select Link Token.
    3. Click the $ which appears in the value field and select the proper associated token.

    Token linking workflow diagrammed in the Style Editor.
    Tag rule configured with tokens in the Style Editor.
  4. Insert a new TextButton into the ScreenGui you previously created and linked and tag it as ButtonPrimary. A convenient shortcut is as follows:

    1. Make sure the new TextButton is selected in the Explorer.
    2. With the .ButtonPrimary tag rule selected in the left column of the Style Editor, click Apply Tag in the main panel. The styles you defined should automatically apply to the button.

    Tag linking workflow diagrammed in the Style Editor.
    Final styled tag rule in the Style Editor.

UI modifier

Instance modifier selectors apply phantom UIComponents such as UICorner or UIStroke to further style an object. The following rule setup styles a TextLabel with a custom text size and rounded corners.

  1. In the left column of the Style Editor, select TextLabel in the UI Elements branch.

    Default class style in the Style Editor.
  2. Link a previously created style token to the TextSize property:

    1. Click Add a Property… in the main panel and select the TextSize property. Remember that you can type keywords to more quickly find properties in the dropdown menu.
    2. Instead of entering a static value, click the button and select Link Token.
    3. Click the $ which appears in the value field and select the $Text32 token.

    Token linking workflow diagrammed in the Style Editor.
    Class rule configured with tokens in the Style Editor.

A pseudo instance is required to configure and apply rounded corners to other elements. To create one:

  1. In the left column, hover over TextLabel, click the button, and navigate through to New ⟩ Pseudo Instance ⟩ UICorner.

    Creation of a pseudo instance in the Style Editor.

    A new UICorner pseudo instance appears under the TextLabel element in the left column.

    Resulting pseudo instance in the Style Editor.
  2. With the new UICorner instance selected in the left column, link a previously created style token to the CornerRadius property:

    1. Click Add a Property… in the main panel and select the CornerRadius property.
    2. Instead of entering a static value, click the button and select Link Token.
    3. Click the $ which appears in the value field and select the $Rad20 token.
    Pseudo instance configured with tokens in the Style Editor.
  3. Insert a new TextLabel into the ScreenGui you previously created and linked. The styles you defined should automatically apply to it.

    Final styled modifier rule in the Style Editor.

State rule

GuiObject state selectors correspond to one of the four GuiState enum values such as Hover, letting you automatically configure style changes for interactive states. The following rule setup creates a hover state of -4 degrees rotation for all ImageButtons.

  1. In the left column of the Style Editor, select ImageButton in the UI Elements branch.

    Default class style in the Style Editor.
  2. Click the button and navigate through to New ⟩ GuiState ⟩ Hover.

    Creation of state rule in the Style Editor.

    A new Hover state modifier instance appears under the ImageButton element in the left column.

    Resulting state rule in the Style Editor.
  3. With the new Hover modifier selected in the left column, click Add a Property… in the main panel and select Rotation. Remember that you can type keywords to more quickly find properties in the dropdown menu.

  4. Enter -4 in the property's value field.

    State rule configured with tokens in the Style Editor.
  5. Insert a new ImageButton into the ScreenGui you previously created and linked. When you hover over the button in the viewport, it should rotate 4 degrees counterclockwise.

    Final styled state rule in the Style Editor.

Style themes

Style themes consist of sets of specific tokens that can be swapped, for example color tokens that define a "light" and "dark" theme.

Theme creation

For extensibility, themes are organized into folders. While a single folder may suffice for most purposes, you're free to organize themes in folders like "colors" or "fonts" if desired.

  1. Create a new theme folder:

    1. In the left column of the Style Editor, hover over Themes, click the , and select New Theme.
    2. Rename the new Folder item to General.
    New themes folder created in the Style Editor.
  2. Create a new theme style sheet:

    1. Hover over the new General folder, click the button, and select New Theme StyleSheet.
    2. Rename it to ThemeA.
    New theme created in the Style Editor.

Theme tokens

Once a theme is constructed, you can link its tokens to various UI object properties such as the BackgroundColor3 of a TextButton. Theme sheets must use a common set of tokens to work correctly.

With ThemeA selected in the left column of the Style Editor:

  1. Link three previously created style tokens to three new theme tokens:

    Theme TokenStyle Token
    BackColor$Gold
    ButtonFont$Oswald
    ButtonTextSize$Text32
    1. Click Add a Token… in the main panel and enter the theme token's name.
    2. Click the $ which appears in the value field and select the associated style token.
    Theme configured with tokens in the Style Editor.
  2. In the left column of the Style Editor, select TextButton in the UI Elements branch.

    Default class style in the Style Editor.
  3. Link the theme's tokens to three new TextButton properties:

    PropertyTheme Token
    BackgroundColor3$BackColor
    FontFace$ButtonFont
    TextSize$ButtonTextSize
    1. Click Add a Property… in the main panel and select the necessary property.
    2. Instead of entering a static value, click the button and select Link Token.
    3. Click the $ which appears in the value field and select the proper theme token.

    Token linking workflow diagrammed in the Style Editor.
    Class rule configured with theme tokens in the Style Editor.

Theme duplication

Once you have a theme generally established, you can duplicate it and change various tokens to define a unique theme style.

  1. In the left column of the Style Editor, hover over the ThemeA theme, click the button, and select Duplicate.

  2. Rename the duplicated theme to ThemeB.

    Theme duplicated in the Style Editor.
  3. Link two of the theme's tokens to two different style tokens:

    Theme TokenStyle Token
    BackColor$Magenta
    ButtonTextSize$Text24
    1. To the right of the property's value field, click the button and select Unlink Token.
    2. Click again and select Link Token.
    3. In its value field, click the $ and select the new associated style token.
    Theme configured with tokens in the Style Editor.

Theme swapping

Once you have multiple themes, you can swap between them via the theme's folder, or via a script as outlined in SetDerives().

  1. In the left column of the Style Editor, select the General folder in the Themes branch.

  2. In the main panel, swap between the themes using the radio buttons.

    ThemeA swapped in the Style Editor.