---
title: "NestedStyleProviderStyleScope"
description: "A scope that allows providing a nested style that will be read and used by a nested styleable composable function."
type: "interface"
lastmod: "2026-09-24"
---
## API Reference

> Source set: Common

```kotlin
public interface NestedStyleProviderStyleScope
```

A scope that allows providing a nested style that will be read and used by a nested styleable
composable function.

[NestedStyleProviderStyleScope](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/NestedStyleProviderStyleScope/api) is implemented by [CommonStyleScope](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/CommonStyleScope/api), but a [CustomStyle](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/CustomStyle/api) may
choose to prevent arbitrary keys from being provided by defining a style scope that excludes this
interface.

## Functions

### provideNestedStyle

> Source set: Common

```kotlin
public fun provideNestedStyle(key: NestedStyleKey, style: CommonStyle)
```

Provides `style` as a nested style to the nested composable identified by the provided `key`.
The `style` is intended to be applied as the style for a nested styleable composable using
`applyNestedStyle`.

#### Parameters

| | |
| --- | --- |
| key | the key that identifies which nested composable this style is applied to |
| style | the style to be applied to the nested composable |
