---
title: "CommonStyle"
description: "Produce a [CommonStyle] by merging [style1] and [style2] where [style1] will apply before [style2]."
type: "function"
lastmod: "2026-09-24"
---
## API Reference

### CommonStyle

> Source set: Common

```kotlin
public fun CommonStyle(style1: CommonStyle, style2: CommonStyle): CommonStyle
```

Produce a [CommonStyle](/jetpack-compose/androidx.compose.foundation/foundation/functions/CommonStyle/api) by merging `style1` and `style2` where `style1` will apply before
`style2`.

#### Parameters

| | |
| --- | --- |
| style1 | the first style to merge that will be applied first. |
| style2 | the second style that will be applied second. |

#### Return

a merged style of `style1` and `style2`

### CommonStyle

> Source set: Common

```kotlin
public fun CommonStyle(
    style1: CommonStyle,
    style2: CommonStyle,
    vararg styles: CommonStyle,
): CommonStyle
```

Produce a [CommonStyle](/jetpack-compose/androidx.compose.foundation/foundation/functions/CommonStyle/api) that merges all the style parameters together in the order they are
provided. Merging removes instances of the default empty [CommonStyle](/jetpack-compose/androidx.compose.foundation/foundation/functions/CommonStyle/api) as well as flattening the
merged styles. For example `Common(CommonStyle, CommonStyle, someStyle)`` will return `someStyle`
as the first two parameters are empty.

#### Parameters

| | |
| --- | --- |
| style1 | the first style to merge that will be applied first. |
| style2 | the second style that will be applied second. |
| styles | the rest of the parameter list that will be applied, in order, after `style2` |

#### Return

a merged style of all the parameters in parameter order.
