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


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

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


```kotlin
class ParagraphStyle(
    val textAlign: TextAlign = TextAlign.Unspecified,
    val textDirection: TextDirection = TextDirection.Unspecified,
    val lineHeight: TextUnit = TextUnit.Unspecified,
    val textIndent: TextIndent? = null,
    val platformStyle: PlatformParagraphStyle? = null,
    val lineHeightStyle: LineHeightStyle? = null,
    val lineBreak: LineBreak = LineBreak.Unspecified,
    val hyphens: Hyphens = Hyphens.Unspecified,
    val textMotion: TextMotion? = null,
) : AnnotatedString.Annotation
```


Paragraph styling configuration for a paragraph. The difference between `SpanStyle` and
`ParagraphStyle` is that, `ParagraphStyle` can be applied to a whole `Paragraph` while
`SpanStyle` can be applied at the character level. Once a portion of the text is marked with a
`ParagraphStyle`, that portion will be separated from the remaining as if a line feed character
was added.

#### Parameters

| | |
| --- | --- |
| textAlign | The alignment of the text within the lines of the paragraph. |
| textDirection | The algorithm to be used to resolve the final text direction: Left To Right or Right To Left. |
| lineHeight | Line height for the `Paragraph` in `TextUnit` unit, e.g. SP or EM. |
| textIndent | The indentation of the paragraph. |
| platformStyle | Platform specific `ParagraphStyle` parameters. |
| lineHeightStyle | the configuration for line height such as vertical alignment of the line, whether to apply additional space as a result of line height to top of first line top and bottom of last line. The configuration is applied only when a `lineHeight` is defined. When null, `LineHeightStyle.Default` is used. |
| lineBreak | The line breaking configuration for the text. |
| hyphens | The configuration of hyphenation. |
| textMotion | Text character placement, whether to optimize for animated or static text. |



## Secondary Constructors

```kotlin
constructor(
    textAlign: TextAlign? = null,
    textDirection: TextDirection? = null,
    lineHeight: TextUnit = TextUnit.Unspecified,
    textIndent: TextIndent? = null,
    platformStyle: PlatformParagraphStyle? = null,
    lineHeightStyle: LineHeightStyle? = null,
    lineBreak: LineBreak? = null,
    hyphens: Hyphens? = null,
    textMotion: TextMotion? = null,
) : this(
    textAlign = textAlign ?: TextAlign.Unspecified,
    textDirection = textDirection ?: TextDirection.Unspecified,
    lineHeight = lineHeight,
    textIndent = textIndent,
    platformStyle = platformStyle,
    lineHeightStyle = lineHeightStyle,
    lineBreak = lineBreak ?: LineBreak.Unspecified,
    hyphens = hyphens ?: Hyphens.Unspecified,
    textMotion = textMotion,
)
```

```kotlin
constructor(
    textAlign: TextAlign? = null,
    textDirection: TextDirection? = null,
    lineHeight: TextUnit = TextUnit.Unspecified,
    textIndent: TextIndent? = null,
) : this(
    textAlign = textAlign ?: TextAlign.Unspecified,
    textDirection = textDirection ?: TextDirection.Unspecified,
    lineHeight = lineHeight,
    textIndent = textIndent,
    platformStyle = null,
    lineHeightStyle = null,
    lineBreak = LineBreak.Unspecified,
    hyphens = Hyphens.Unspecified,
    textMotion = null,
)
```

```kotlin
constructor(
    textAlign: TextAlign? = null,
    textDirection: TextDirection? = null,
    lineHeight: TextUnit = TextUnit.Unspecified,
    textIndent: TextIndent? = null,
    platformStyle: PlatformParagraphStyle? = null,
    lineHeightStyle: LineHeightStyle? = null,
) : this(
    textAlign = textAlign ?: TextAlign.Unspecified,
    textDirection = textDirection ?: TextDirection.Unspecified,
    lineHeight = lineHeight,
    textIndent = textIndent,
    platformStyle = platformStyle,
    lineHeightStyle = lineHeightStyle,
    lineBreak = LineBreak.Unspecified,
    hyphens = Hyphens.Unspecified,
    textMotion = null,
)
```

```kotlin
constructor(
    textAlign: TextAlign? = null,
    textDirection: TextDirection? = null,
    lineHeight: TextUnit = TextUnit.Unspecified,
    textIndent: TextIndent? = null,
    platformStyle: PlatformParagraphStyle? = null,
    lineHeightStyle: LineHeightStyle? = null,
    lineBreak: LineBreak? = null,
    hyphens: Hyphens? = null,
) : this(
    textAlign = textAlign ?: TextAlign.Unspecified,
    textDirection = textDirection ?: TextDirection.Unspecified,
    lineHeight = lineHeight,
    textIndent = textIndent,
    platformStyle = platformStyle,
    lineHeightStyle = lineHeightStyle,
    lineBreak = lineBreak ?: LineBreak.Unspecified,
    hyphens = hyphens ?: Hyphens.Unspecified,
    textMotion = null,
)
```

## Properties

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


> **Deprecated** Kept for backwards compatibility.

```kotlin
val deprecated_boxing_textAlign: TextAlign?
```


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


> **Deprecated** Kept for backwards compatibility.

```kotlin
val deprecated_boxing_textDirection: TextDirection?
```


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


> **Deprecated** Kept for backwards compatibility.

```kotlin
val deprecated_boxing_hyphens: Hyphens?
```


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


> **Deprecated** Kept for backwards compatibility.

```kotlin
val deprecated_boxing_lineBreak: LineBreak?
```


## Functions



<h2 id="merge-other">merge</h2>

```kotlin
fun merge(other: ParagraphStyle? = null): ParagraphStyle
```


Returns a new paragraph style that is a combination of this style and the given `other`
style.

If the given paragraph style is null, returns this paragraph style.




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


<h2 id="plus-other">plus</h2>

```kotlin
operator fun plus(other: ParagraphStyle): ParagraphStyle
```


Plus operator overload that applies a `merge`.




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


<h2 id="copy-textalign-textdirection-lineheight-textindent">copy</h2>

```kotlin
fun copy(
        textAlign: TextAlign? = this.textAlign,
        textDirection: TextDirection? = this.textDirection,
        lineHeight: TextUnit = this.lineHeight,
        textIndent: TextIndent? = this.textIndent,
    ): ParagraphStyle
```



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


<h2 id="copy-textalign-textdirection-lineheight-textindent-platformstyle-lineheightstyle">copy</h2>

```kotlin
fun copy(
        textAlign: TextAlign? = this.textAlign,
        textDirection: TextDirection? = this.textDirection,
        lineHeight: TextUnit = this.lineHeight,
        textIndent: TextIndent? = this.textIndent,
        platformStyle: PlatformParagraphStyle? = this.platformStyle,
        lineHeightStyle: LineHeightStyle? = this.lineHeightStyle,
    ): ParagraphStyle
```



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


<h2 id="copy-textalign-textdirection-lineheight-textindent-platformstyle-lineheightstyle-linebreak-hyphens">copy</h2>

```kotlin
fun copy(
        textAlign: TextAlign? = this.textAlign,
        textDirection: TextDirection? = this.textDirection,
        lineHeight: TextUnit = this.lineHeight,
        textIndent: TextIndent? = this.textIndent,
        platformStyle: PlatformParagraphStyle? = this.platformStyle,
        lineHeightStyle: LineHeightStyle? = this.lineHeightStyle,
        lineBreak: LineBreak? = this.lineBreak,
        hyphens: Hyphens? = this.hyphens,
    ): ParagraphStyle
```



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


<h2 id="copy-textalign-textdirection-lineheight-textindent-platformstyle-lineheightstyle-linebreak-hyphens-textmotion">copy</h2>

```kotlin
fun copy(
        textAlign: TextAlign? = this.textAlign,
        textDirection: TextDirection? = this.textDirection,
        lineHeight: TextUnit = this.lineHeight,
        textIndent: TextIndent? = this.textIndent,
        platformStyle: PlatformParagraphStyle? = this.platformStyle,
        lineHeightStyle: LineHeightStyle? = this.lineHeightStyle,
        lineBreak: LineBreak? = this.lineBreak,
        hyphens: Hyphens? = this.hyphens,
        textMotion: TextMotion? = this.textMotion,
    ): ParagraphStyle
```



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


<h2 id="copy-textalign-textdirection-lineheight-textindent-platformstyle-lineheightstyle-linebreak-hyphens-textmotion-2">copy</h2>

```kotlin
fun copy(
        textAlign: TextAlign = this.textAlign,
        textDirection: TextDirection = this.textDirection,
        lineHeight: TextUnit = this.lineHeight,
        textIndent: TextIndent? = this.textIndent,
        platformStyle: PlatformParagraphStyle? = this.platformStyle,
        lineHeightStyle: LineHeightStyle? = this.lineHeightStyle,
        lineBreak: LineBreak = this.lineBreak,
        hyphens: Hyphens = this.hyphens,
        textMotion: TextMotion? = this.textMotion,
    ): ParagraphStyle
```