---
title: "TextLinkStyles"
description: "Represents the styles of the links in the [AnnotatedString] in different states

These style objects will be applied to every [LinkAnnotation] annotation present in the
[AnnotatedString], overriding any styling that might be already present in the [AnnotatedString]
at the [LinkAnnotation]'s position.

If null is passed to the style argument, it means that a [LinkAnnotation] representing a link
will not get a specific link styling for this state. Instead it will be styled according to the
rest of the [AnnotatedString].

The resulting style of the link is always a combination of all styles merged into one in the
order `style.merge(focusedStyle).merge(hoveredStyle).merge(pressedStyle)`."
type: "class"
---

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


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

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


```kotlin
class TextLinkStyles(
    val style: SpanStyle? = null,
    val focusedStyle: SpanStyle? = null,
    val hoveredStyle: SpanStyle? = null,
    val pressedStyle: SpanStyle? = null,
)
```


Represents the styles of the links in the `AnnotatedString` in different states

These style objects will be applied to every `LinkAnnotation` annotation present in the
`AnnotatedString`, overriding any styling that might be already present in the `AnnotatedString`
at the `LinkAnnotation`'s position.

If null is passed to the style argument, it means that a `LinkAnnotation` representing a link
will not get a specific link styling for this state. Instead it will be styled according to the
rest of the `AnnotatedString`.

The resulting style of the link is always a combination of all styles merged into one in the
order `style.merge(focusedStyle).merge(hoveredStyle).merge(pressedStyle)`.

#### Parameters

| | |
| --- | --- |
| style | style configuration for a link that is always applied |
| focusedStyle | style configuration for a link applied on top of the `style` when the link is focused |
| hoveredStyle | style configuration for a link applied on top of the `style` when the link is hovered |
| pressedStyle | style configuration for a link applied on top of the `style` when the link is pressed |




