---
title: "Text"
description: "Adds a text view to the glance view."
type: "composable"
---

<div class='type'>Composable Function</div>


<a id='references'></a>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
@Composable
public fun Text(
    text: String,
    modifier: GlanceModifier = GlanceModifier,
    style: TextStyle = defaultTextStyle,
    maxLines: Int = Int.MAX_VALUE,
)
```


Adds a text view to the glance view.

#### Parameters

| | |
| --- | --- |
| text | The text to be displayed. |
| modifier | `GlanceModifier` to apply to this layout node. |
| style | `TextStyle`` configuration for the text such as color, font, text align etc. |
| maxLines | An optional maximum number of lines for the text to span, wrapping if necessary. If the text exceeds the given number of lines, it will be truncated. |





