# TextLinkStyles

Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/TextLinkStyles.kt+class:androidx.compose.ui.text.TextLinkStyles) Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0) Common/AllAndroid/JVM
- Cmn

  ```
  class TextLinkStyles
  ```

*** ** * ** ***

Represents the styles of the links in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` in different states

These style objects will be applied to every `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/LinkAnnotation` annotation present in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString`, overriding any styling that might be already present in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` at the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/LinkAnnotation`'s position.

If null is passed to the style argument, it means that a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/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 `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/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)`.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#TextLinkStyles(androidx.compose.ui.text.SpanStyle,androidx.compose.ui.text.SpanStyle,androidx.compose.ui.text.SpanStyle,androidx.compose.ui.text.SpanStyle)( style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle?, focusedStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle?, hoveredStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle?, pressedStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle? )` | Cmn |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#hashCode()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#focusedStyle()` style configuration for a link applied on top of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#style()` when the link is focused | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#hoveredStyle()` style configuration for a link applied on top of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#style()` when the link is hovered | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#pressedStyle()` style configuration for a link applied on top of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#style()` when the link is pressed | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#style()` style configuration for a link that is always applied | Cmn |

## Public constructors

### TextLinkStyles

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

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

| Parameters |
|---|---|
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle? = null` | style configuration for a link that is always applied |
| `focusedStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle? = null` | style configuration for a link applied on top of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#style()` when the link is focused |
| `hoveredStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle? = null` | style configuration for a link applied on top of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#style()` when the link is hovered |
| `pressedStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle? = null` | style configuration for a link applied on top of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#style()` when the link is pressed |

## Public functions

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

Cmn

```
open fun hashCode(): Int
```

## Public properties

### focusedStyle

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
val focusedStyle: SpanStyle?
```

style configuration for a link applied on top of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#style()` when the link is focused

### hoveredStyle

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
val hoveredStyle: SpanStyle?
```

style configuration for a link applied on top of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#style()` when the link is hovered

### pressedStyle

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
val pressedStyle: SpanStyle?
```

style configuration for a link applied on top of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLinkStyles#style()` when the link is pressed

### style

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
val style: SpanStyle?
```

style configuration for a link that is always applied