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


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


<h2 id="annotatedstring-text-spanstyle-paragraphstyle">AnnotatedString</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun AnnotatedString(
    text: String,
    spanStyle: SpanStyle,
    paragraphStyle: ParagraphStyle? = null,
): AnnotatedString
```


Create an AnnotatedString with a `spanStyle` that will apply to the whole text.

#### Parameters

| | |
| --- | --- |
| text | the text to be styled |
| spanStyle | `SpanStyle` to be applied to whole text |
| paragraphStyle | `ParagraphStyle` to be applied to whole text |






<hr class="docs-overload-divider">


<h2 id="annotatedstring-text-paragraphstyle">AnnotatedString</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun AnnotatedString(text: String, paragraphStyle: ParagraphStyle): AnnotatedString
```


Create an AnnotatedString with a `paragraphStyle` that will apply to the whole text.

#### Parameters

| | |
| --- | --- |
| text | the text to be styled |
| paragraphStyle | `ParagraphStyle` to be applied to whole text |