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

```kotlin
sealed interface PaneScaffoldScope
```

The base scope of pane scaffolds, which provides scoped functions that supported by pane
scaffolds.

## Properties

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

```kotlin
val saveableStateHolder: SaveableStateHolder
```

The saveable state holder to save pane states across their visibility life-cycles. The
default pane implementations like [AnimatedPane](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/composable-functions/AnimatedPane) are supposed to use it to store states.

## Functions

<h2 id="preferredwidth-width">preferredWidth</h2>

```kotlin
fun Modifier.preferredWidth(width: Dp): Modifier
```

This modifier specifies the preferred width for a pane in `Dp`s, and the pane scaffold
implementation will try its best to respect this width when the associated pane is rendered
as a fixed pane, i.e., a pane that are not stretching to fill the remaining spaces. In case
the modifier is not set or set to `Dp.Unspecified`, the default preferred widths provided by
[PaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) are supposed to be used.

Note that the preferred width may not be applied when the associated pane has a higher
priority than the rest of panes (for example, primary pane v.s. secondary pane) so it
stretches to fill the available width, or when there are hinges to avoid intersecting with
the scaffold, so the pane will be shrunk or expanded to respect the hinge areas.

Also note that if multiple [PaneScaffoldScope.preferredWidth](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/interfaces/PaneScaffoldScope) modifiers are applied, the last
applied one will override all the previous settings.

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

<h2 id="preferredwidth-proportion">preferredWidth</h2>

```kotlin
fun Modifier.preferredWidth(@FloatRange(0.0, 1.0) proportion: Float): Modifier
```

This modifier specifies the preferred width for a pane as a proportion of the overall
scaffold width. The value is a float ranging from 0.0 to 1.0.

The pane scaffold implementation will endeavor to respect this width when the associated pane
is rendered as a fixed pane, i.e., a pane that is not stretching to fill the remaining
spaces.

If this modifier is not set, the default preferred width defined by
[PaneScaffoldDirective.defaultPanePreferredWidth](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) will be used.

Note that the preferred width may not be applied when the associated pane has a higher
priority than the rest of panes (for example, primary pane v.s. secondary pane) so it
stretches to fill the available width, or when there are hinges to avoid intersecting with
the scaffold, so the pane will be shrunk or expanded to respect the hinge areas.

Also note that if multiple [PaneScaffoldScope.preferredWidth](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/interfaces/PaneScaffoldScope) modifiers are applied, the last
applied one will override all the previous settings.

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

<h2 id="preferredheight-height">preferredHeight</h2>

```kotlin
fun Modifier.preferredHeight(height: Dp): Modifier
```

This modifier specifies the preferred height for a pane in `Dp`s, and the pane scaffold
implementation will try its best to respect this height when the associated pane is rendered
as a reflowed or a levitated pane. In case the modifier is not set or set to
`Dp.Unspecified`, the default preferred heights provided by [PaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) are
supposed to be used.

Note that the preferred height may not be applied when the associated pane is an expanded
pane so it stretches to fill the available height, or when there are hinges to avoid
intersecting with the scaffold, so the pane will be shrunk or expanded to respect the hinge
areas.

Also note that if multiple [PaneScaffoldScope.preferredHeight](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/interfaces/PaneScaffoldScope) modifiers are applied, the
last applied one will override all the previous settings.

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

<h2 id="preferredheight-proportion">preferredHeight</h2>

```kotlin
fun Modifier.preferredHeight(@FloatRange(0.0, 1.0) proportion: Float): Modifier
```

This modifier specifies the preferred height for a pane as a proportion of the overall
scaffold height. The value is a float ranging from 0.0 to 1.0.

The pane scaffold implementation will endeavor to respect this height when the associated
pane is rendered in its [PaneAdaptedValue.Reflowed](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneAdaptedValue.Reflowed) or [PaneAdaptedValue.Levitated](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneAdaptedValue.Levitated) state.

If this modifier is not set, the default preferred height defined by
[PaneScaffoldDirective.defaultPanePreferredHeight](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) will be used.

Note that the preferred height may not be applied when the associated pane is an expanded
pane so it stretches to fill the available height, or when there are hinges to avoid
intersecting with the scaffold, so the pane will be shrunk or expanded to respect the hinge
areas.

Also note that if multiple [PaneScaffoldScope.preferredHeight](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/interfaces/PaneScaffoldScope) modifiers are applied, the
last applied one will override all the previous settings.

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

<h2 id="paneexpansiondraggable-state-mintouchtargetsize-interactionsource-semanticsproperties">paneExpansionDraggable</h2>

```kotlin
fun Modifier.paneExpansionDraggable(
        state: PaneExpansionState,
        minTouchTargetSize: Dp,
        interactionSource: MutableInteractionSource,
        semanticsProperties: (SemanticsPropertyReceiver.() -> Unit)? = null,
    ): Modifier
```

The modifier that should be applied on a drag handle composable so the drag handle can be
dragged and operate on the provided [PaneExpansionState](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneExpansionState) properly. By default this modifier
supports two types of user interactions:
1. Dragging the handle horizontally within the pane scaffold.
2. Accessibility actions provided via [semanticsProperties](/jetpack-compose/androidx.compose.remote/remote-creation-compose/objects/SemanticsProperties).

Besides that, this modifier also sets up other necessary behaviors of a pane expansion drag
handle, like excluding system gestures and ensuring minimum touch target size.

#### Parameters

| | |
| --- | --- |
| state | the [PaneExpansionState](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneExpansionState) that controls the pane expansion of the associated pane scaffold |
| minTouchTargetSize | the minimum touch target size of the drag handle |
| interactionSource | the [MutableInteractionSource](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/MutableInteractionSource) to address user interactions |
| semanticsProperties | the optional semantics setup working with accessibility services; a default implementation will be used if nothing is provided. |

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

<h2 id="panemargins-insets">paneMargins</h2>

```kotlin
@ExperimentalMaterial3AdaptiveApi
    @Composable
    fun Modifier.paneMargins(vararg insets: RectRulers): Modifier
```

This modifier specifies the associated pane's margins according to the provided [RectRulers](/jetpack-compose/androidx.compose.ui/ui/interfaces/RectRulers)
as insets. Note that if multiple inset rulers are provided, the scaffold will decide the
actual margins by taking the union of these insets - i.e. the one creating the largest
margins will be used.

#### Parameters

| | |
| --- | --- |
| insets | the insets the pane wants to respect. |

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

<h2 id="panemargins-fixedmargins-insets">paneMargins</h2>

```kotlin
@ExperimentalMaterial3AdaptiveApi
    @Composable
    fun Modifier.paneMargins(fixedMargins: PaddingValues, vararg insets: RectRulers): Modifier
```

This modifier specifies the associated pane's margins according to specified fixed margins
and the provided [RectRulers](/jetpack-compose/androidx.compose.ui/ui/interfaces/RectRulers) as insets, if any. Note that the scaffold will decide the
actual margins by taking the union of the fixed margins and the provided insets - i.e. the
one creating the largest margins will be used.

#### Parameters

| | |
| --- | --- |
| fixedMargins | fixed margins to use for the pane; note that the margins will only be applied against the pane scaffold's bounds - for example if the scaffold is showing a dual-pane layout, in common situations, the spacer size between two panes won't be decided by either the left pane's right margin or the right pane's left margin, instead, [PaneScaffoldDirective.horizontalPartitionSpacerSize](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) will be used. |
| insets | the insets the pane wants to respect. |