[android-components](../../index.md) / [mozilla.components.browser.menu2.candidate](../index.md) / [TextStyle](./index.md)

# TextStyle

`data class TextStyle` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/browser/menu2/src/main/java/mozilla/components/browser/menu2/candidate/TextStyle.kt#L19)

Describes styling for text inside a menu option.

### Parameters

`size` - : The size of the text.

`color` - : The color to apply to the text.

### Constructors

| Name | Summary |
|---|---|
| [&lt;init&gt;](-init-.md) | `TextStyle(size: `[`Float`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`? = null, color: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, textStyle: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = Typeface.NORMAL, textAlignment: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = View.TEXT_ALIGNMENT_INHERIT)`<br>Describes styling for text inside a menu option. |

### Properties

| Name | Summary |
|---|---|
| [color](color.md) | `val color: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`<br>: The color to apply to the text. |
| [size](size.md) | `val size: `[`Float`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`?`<br>: The size of the text. |
| [textAlignment](text-alignment.md) | `val textAlignment: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) |
| [textStyle](text-style.md) | `val textStyle: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) |

### Extension Functions

| Name | Summary |
|---|---|
| [loadResourceAsString](../../mozilla.components.support.test.file/kotlin.-any/load-resource-as-string.md) | `fun `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`.loadResourceAsString(path: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)<br>Loads a file from the resources folder and returns its content as a string object. |
