---
title: "StyleLayerScope"
description: "Introduces the [CustomStyleScope] [styleLayer] method that allows styles to create a style property layer."
type: "interface"
lastmod: "2026-10-07"
---
## API Reference

> Source set: Common

```kotlin
public interface StyleLayerScope
```

Introduces the [CustomStyleScope](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/CustomStyleScope/api) `styleLayer` method that allows styles to create a style
property layer.

This is a separate interface to allow a [CustomStyle](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/CustomStyle/api) type to decide if `styleLayer` is available
directly in a style.

## Functions

### styleLayer

> Source set: Common

```kotlin
public fun styleLayer(block: () -> Unit)
```

Raise the layer of properties that are set in `block`. Properties set in a layer will take
precedence over properties set in the layers below it. A layer is implied by
`StyleStateScope.state`, or helpers that use it, such as `StyleStateScope.pressed` and
`StyleStateScope.focused`.

The last property set with the greatest style layer is the resolved value of a style
property.
