> ## Documentation Index
> Fetch the complete documentation index at: https://docs.infilsense.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Labels

> Add static text for headings, section labels, and lightweight metadata.

Labels are non-interactive rows intended for headings, descriptions, and separators.

## Simple label

```lua theme={null}
tab:AddLabel("Player Configuration")
```

## Styled label

```lua theme={null}
tab:AddLabel({
	Text = "<b>Character Settings</b>",
	TextColor3 = Color3.fromRGB(200, 200, 200),
	TextSize = 14,
})
```

Rich text uses Roblox's native `TextLabel.RichText` markup and is enabled by default:

```lua theme={null}
tab:AddLabel({
	Text = "<font color=\"#9D7BFF\"><b>Character</b></font> <i>Settings</i>",
})
```

Set `RichText = false` to opt out. The option is also supported on button, input,
selection, and slider configs. For those components it formats the title and its
description tooltip. You can set it on the component config or inside `Info`:

```lua theme={null}
tab:AddButton({
	Info = {
		Title = "<b>Heal</b>",
		Description = "<font color=\"#9D7BFF\">Restores health.</font>",
	},
})
```

`Info.Title` is accepted as a fallback when `Text` is not supplied:

```lua theme={null}
tab:AddLabel({
	Info = { Title = "Advanced Settings" },
})
```

## Parameters

**config** `string | table` *required*

Use a string for the simplest form or a table for styling.

**Text** `string` (default: "Label")

Label content. `Info.Title` is used as a fallback.

**Info.Title** `string`

Fallback label content when `Text` is absent.

**TextColor3** `Color3`

Custom text color for this label.

**TextSize** `number` (default: 13)

Text size in pixels.

**RichText** `boolean` (default: true)

Enables Roblox rich-text tags such as `<b>`, `<i>`, `<u>`, `<s>`, `<font>`, and `<br>`.
Set to `false` to render the content as plain text.

## Returned handle

```lua theme={null}
local label = tab:AddLabel("Initial text")

label:SetText("Updated text")
print(label:GetText())
```

| Member | Behavior |
| :- | :- |
| `frame` | Outer label `Frame`. |
| `textLabel` | Underlying `TextLabel`. |
| `SetText(text)` | Replaces the label text. |
| `SetRichText(enabled)` | Enables or disables rich-text rendering. |
| `GetText()` | Returns the current label text. |
| `GetRichText()` | Returns whether rich-text rendering is enabled. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.