# StringAnnotation

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/StringAnnotation.kt+class:androidx.compose.ui.text.StringAnnotation) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.8.0) Common/AllAndroid/JVM
- Cmn

  ```
  value class StringAnnotation : AnnotatedString.Annotation
  ```

*** ** * ** ***

An `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Annotation` class which holds a String `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/StringAnnotation#value()`.

You can use it to provide a custom annotation to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString`.

If you use the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Builder` methods like `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.text.AnnotatedString.Builder).withAnnotation(kotlin.String,kotlin.String,kotlin.Function1)` and provide a string annotation, it will be automatically wrapped into this holder class.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.text.AnnotatedString.Builder).withAnnotation(kotlin.String,kotlin.String,kotlin.Function1)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString#getStringAnnotations(kotlin.String,kotlin.Int,kotlin.Int)` |   |

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/StringAnnotation#StringAnnotation(kotlin.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/StringAnnotation#value()` | Cmn |

## Public constructors

### StringAnnotation

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

```
StringAnnotation(value: String)
```

## Public properties

### value

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

```
val value: String
```