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


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** Font.ResourceLoader is deprecated, instead pass FontFamily.Resolver



<h2 id="paragraph-text-style-spanstyles-placeholders-maxlines-ellipsis-width-density-resourceloader">Paragraph</h2>

```kotlin
fun Paragraph(
    text: String,
    style: TextStyle,
    spanStyles: List<AnnotatedString.Range<SpanStyle>> = listOf(),
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
    maxLines: Int = DefaultMaxLines,
    ellipsis: Boolean = false,
    width: Float,
    density: Density,
    resourceLoader: Font.ResourceLoader,
): Paragraph
```


Lays out a given `text` with the given constraints. A paragraph is a text that has a single
`ParagraphStyle`.

If the `style` does not contain any `androidx.compose.ui.text.style.TextDirection`,
`androidx.compose.ui.text.style.TextDirection.Content` is used as the default value.

#### Parameters

| | |
| --- | --- |
| text | the text to be laid out |
| style | the `TextStyle` to be applied to the whole text |
| spanStyles | `SpanStyle`s to be applied to parts of text |
| placeholders | a list of placeholder metrics which tells `Paragraph` where should be left blank to leave space for inline elements. |
| maxLines | the maximum number of lines that the text can have |
| ellipsis | whether to ellipsize text, applied only when `maxLines` is set |
| width | how wide the text is allowed to be |
| density | density of the device |
| resourceLoader | `Font.ResourceLoader` to be used to load the font given in `SpanStyle`s |




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


> **Deprecated** Paragraph that takes maximum allowed width is deprecated, pass constraints instead.



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


<h2 id="paragraph-text-style-width-density-fontfamilyresolver-spanstyles-placeholders-maxlines-ellipsis">Paragraph</h2>

```kotlin
fun Paragraph(
    text: String,
    style: TextStyle,
    width: Float,
    density: Density,
    fontFamilyResolver: FontFamily.Resolver,
    spanStyles: List<AnnotatedString.Range<SpanStyle>> = listOf(),
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
    maxLines: Int = DefaultMaxLines,
    ellipsis: Boolean = false,
): Paragraph
```


Lays out a given `text` with the given constraints. A paragraph is a text that has a single
`ParagraphStyle`.

If the `style` does not contain any `androidx.compose.ui.text.style.TextDirection`,
`androidx.compose.ui.text.style.TextDirection.Content` is used as the default value.

#### Parameters

| | |
| --- | --- |
| text | the text to be laid out |
| style | the `TextStyle` to be applied to the whole text |
| width | how wide the text is allowed to be |
| density | density of the device |
| fontFamilyResolver | `FontFamily.Resolver` to be used to load the font given in `SpanStyle`s |
| spanStyles | `SpanStyle`s to be applied to parts of text |
| placeholders | a list of placeholder metrics which tells `Paragraph` where should be left blank to leave space for inline elements. |
| maxLines | the maximum number of lines that the text can have |
| ellipsis | whether to ellipsize text, applied only when `maxLines` is set |




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


> **Deprecated** Paragraph that takes `ellipsis: Boolean` is deprecated, pass TextOverflow instead.



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


<h2 id="paragraph-text-style-constraints-density-fontfamilyresolver-spanstyles-placeholders-maxlines-ellipsis">Paragraph</h2>

```kotlin
fun Paragraph(
    text: String,
    style: TextStyle,
    constraints: Constraints,
    density: Density,
    fontFamilyResolver: FontFamily.Resolver,
    spanStyles: List<AnnotatedString.Range<SpanStyle>> = listOf(),
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
    maxLines: Int = DefaultMaxLines,
    ellipsis: Boolean = false,
): Paragraph
```


Lays out a given `text` with the given constraints. A paragraph is a text that has a single
`ParagraphStyle`.

If the `style` does not contain any `androidx.compose.ui.text.style.TextDirection`,
`androidx.compose.ui.text.style.TextDirection.Content` is used as the default value.

#### Parameters

| | |
| --- | --- |
| text | the text to be laid out |
| style | the `TextStyle` to be applied to the whole text |
| constraints | how wide and tall the text is allowed to be. `Constraints.maxWidth` will define the width of the Paragraph. `Constraints.maxHeight` helps defining the number of lines that fit with ellipsis is true. Minimum components of the `Constraints` object are no-op. |
| density | density of the device |
| fontFamilyResolver | `FontFamily.Resolver` to be used to load the font given in `SpanStyle`s |
| spanStyles | `SpanStyle`s to be applied to parts of text |
| placeholders | a list of placeholder metrics which tells `Paragraph` where should be left blank to leave space for inline elements. |
| maxLines | the maximum number of lines that the text can have |
| ellipsis | whether to ellipsize text, applied only when `maxLines` is set |






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


<h2 id="paragraph-text-style-constraints-density-fontfamilyresolver-spanstyles-placeholders-maxlines-overflow">Paragraph</h2>

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


```kotlin
fun Paragraph(
    text: String,
    style: TextStyle,
    constraints: Constraints,
    density: Density,
    fontFamilyResolver: FontFamily.Resolver,
    spanStyles: List<AnnotatedString.Range<SpanStyle>> = listOf(),
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
    maxLines: Int = DefaultMaxLines,
    overflow: TextOverflow = TextOverflow.Clip,
): Paragraph
```


Lays out a given `text` with the given constraints. A paragraph is a text that has a single
`ParagraphStyle`.

If the `style` does not contain any `androidx.compose.ui.text.style.TextDirection`,
`androidx.compose.ui.text.style.TextDirection.Content` is used as the default value.

#### Parameters

| | |
| --- | --- |
| text | the text to be laid out |
| style | the `TextStyle` to be applied to the whole text |
| constraints | how wide and tall the text is allowed to be. `Constraints.maxWidth` will define the width of the Paragraph. `Constraints.maxHeight` helps defining the number of lines that fit with ellipsis is true. Minimum components of the `Constraints` object are no-op. |
| density | density of the device |
| fontFamilyResolver | `FontFamily.Resolver` to be used to load the font given in `SpanStyle`s |
| spanStyles | `SpanStyle`s to be applied to parts of text |
| placeholders | a list of placeholder metrics which tells `Paragraph` where should be left blank to leave space for inline elements. |
| maxLines | the maximum number of lines that the text can have |
| overflow | specifies how visual overflow should be handled |




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


> **Deprecated** Paragraph that takes maximum allowed width is deprecated, pass constraints instead.



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


<h2 id="paragraph-paragraphintrinsics-maxlines-ellipsis-width">Paragraph</h2>

```kotlin
fun Paragraph(
    paragraphIntrinsics: ParagraphIntrinsics,
    maxLines: Int = DefaultMaxLines,
    ellipsis: Boolean = false,
    width: Float,
): Paragraph
```


Lays out the text in `ParagraphIntrinsics` with the given constraints. A paragraph is a text that
has a single `ParagraphStyle`.

#### Parameters

| | |
| --- | --- |
| paragraphIntrinsics | `ParagraphIntrinsics` instance |
| maxLines | the maximum number of lines that the text can have |
| ellipsis | whether to ellipsize text, applied only when `maxLines` is set |
| width | how wide the text is allowed to be |




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


> **Deprecated** Paragraph that takes ellipsis: Boolean is deprecated, pass TextOverflow instead.



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


<h2 id="paragraph-paragraphintrinsics-constraints-maxlines-ellipsis">Paragraph</h2>

```kotlin
fun Paragraph(
    paragraphIntrinsics: ParagraphIntrinsics,
    constraints: Constraints,
    maxLines: Int = DefaultMaxLines,
    ellipsis: Boolean = false,
): Paragraph
```


Lays out the text in `ParagraphIntrinsics` with the given constraints. A paragraph is a text that
has a single `ParagraphStyle`.

#### Parameters

| | |
| --- | --- |
| paragraphIntrinsics | `ParagraphIntrinsics` instance |
| constraints | how wide and tall the text is allowed to be. `Constraints.maxWidth` will define the width of the Paragraph. `Constraints.maxHeight` helps defining the number of lines that fit with ellipsis is true. Minimum components of the `Constraints` object are no-op. |
| maxLines | the maximum number of lines that the text can have |
| ellipsis | whether to ellipsize text, applied only when `maxLines` is set |






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


<h2 id="paragraph-paragraphintrinsics-constraints-maxlines-overflow">Paragraph</h2>

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


```kotlin
fun Paragraph(
    paragraphIntrinsics: ParagraphIntrinsics,
    constraints: Constraints,
    maxLines: Int = DefaultMaxLines,
    overflow: TextOverflow = TextOverflow.Clip,
): Paragraph
```


Lays out the text in `ParagraphIntrinsics` with the given constraints. A paragraph is a text that
has a single `ParagraphStyle`.

#### Parameters

| | |
| --- | --- |
| paragraphIntrinsics | `ParagraphIntrinsics` instance |
| constraints | how wide and tall the text is allowed to be. `Constraints.maxWidth` will define the width of the Paragraph. `Constraints.maxHeight` helps defining the number of lines that fit with ellipsis is true. Minimum components of the `Constraints` object are no-op. |
| maxLines | the maximum number of lines that the text can have |
| overflow | specifies how visual overflow should be handled |