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

```kotlin
class PaneScaffoldDirective(
    val maxHorizontalPartitions: Int,
    val horizontalPartitionSpacerSize: Dp,
    val maxVerticalPartitions: Int,
    val verticalPartitionSpacerSize: Dp,
    val defaultPanePreferredWidth: Dp,
    val defaultPanePreferredHeight: Dp,
    val excludedBounds: List<Rect>,
    @get:JvmName("shouldAutoFocusCurrentDestination") val shouldAutoFocusCurrentDestination: Boolean,
)
```

Top-level directives about how a pane scaffold should be arranged and spaced, like how many
partitions the layout can be split into and what should be the gutter size.

## Secondary Constructors

```kotlin
constructor(
    maxHorizontalPartitions: Int,
    horizontalPartitionSpacerSize: Dp,
    maxVerticalPartitions: Int,
    verticalPartitionSpacerSize: Dp,
    defaultPanePreferredWidth: Dp,
    excludedBounds: List<Rect>,
) : this(
    maxHorizontalPartitions = maxHorizontalPartitions,
    horizontalPartitionSpacerSize = horizontalPartitionSpacerSize,
    maxVerticalPartitions = maxVerticalPartitions,
    verticalPartitionSpacerSize = verticalPartitionSpacerSize,
    defaultPanePreferredWidth = defaultPanePreferredWidth,
    defaultPanePreferredHeight = DefaultPreferredHeight,
    excludedBounds = excludedBounds,
)
```

```kotlin
constructor(
    maxHorizontalPartitions: Int,
    horizontalPartitionSpacerSize: Dp,
    maxVerticalPartitions: Int,
    verticalPartitionSpacerSize: Dp,
    defaultPanePreferredWidth: Dp,
    defaultPanePreferredHeight: Dp,
    excludedBounds: List<Rect>,
) : this(
    maxHorizontalPartitions = maxHorizontalPartitions,
    horizontalPartitionSpacerSize = horizontalPartitionSpacerSize,
    maxVerticalPartitions = maxVerticalPartitions,
    verticalPartitionSpacerSize = verticalPartitionSpacerSize,
    defaultPanePreferredWidth = defaultPanePreferredWidth,
    defaultPanePreferredHeight = defaultPanePreferredHeight,
    excludedBounds = excludedBounds,
    shouldAutoFocusCurrentDestination = true,
)
```

## Functions

<h2 id="copy-maxhorizontalpartitions-horizontalpartitionspacersize-maxverticalpartitions-verticalpartitionspacersize-defaultpanepreferredwidth-excludedbounds-defaultpanepreferredheight">copy</h2>

```kotlin
fun copy(
        maxHorizontalPartitions: Int = this.maxHorizontalPartitions,
        horizontalPartitionSpacerSize: Dp = this.horizontalPartitionSpacerSize,
        maxVerticalPartitions: Int = this.maxVerticalPartitions,
        verticalPartitionSpacerSize: Dp = this.verticalPartitionSpacerSize,
        defaultPanePreferredWidth: Dp = this.defaultPanePreferredWidth,
        excludedBounds: List<Rect> = this.excludedBounds,
        defaultPanePreferredHeight: Dp = this.defaultPanePreferredHeight,
    ): PaneScaffoldDirective
```

Returns a new copy of [PaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) with specified fields overwritten. Use this
method to create a custom [PaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) from the default instance or the result of
[calculatePaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/functions/calculatePaneScaffoldDirective).

#### Parameters

| | |
| --- | --- |
| maxHorizontalPartitions | the max number of partitions along the horizontal axis the layout can be split into. |
| horizontalPartitionSpacerSize | Size of the spacers between horizontal partitions. It's equivalent to the left/right margins the horizontal partitions. |
| maxVerticalPartitions | the max number of partitions along the vertical axis the layout can be split into. |
| verticalPartitionSpacerSize | Size of the spacers between vertical partitions. It's equivalent to the top/bottom margins of the vertical partitions. |
| defaultPanePreferredWidth | Default preferred width of panes that will be used by the scaffold if there's no [PaneScaffoldScope.preferredWidth](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/interfaces/PaneScaffoldScope) provided with a pane. |
| excludedBounds | the bounds of all areas in the window that the layout needs to avoid displaying anything upon it. Usually these bounds represent where physical hinges are. |
| defaultPanePreferredHeight | Default preferred height of panes that will be used by the scaffold if there's no [PaneScaffoldScope.preferredHeight](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/interfaces/PaneScaffoldScope) provided with a pane. |

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

<h2 id="copy-maxhorizontalpartitions-horizontalpartitionspacersize-maxverticalpartitions-verticalpartitionspacersize-defaultpanepreferredwidth-excludedbounds">copy</h2>

```kotlin
fun copy(
        maxHorizontalPartitions: Int = this.maxHorizontalPartitions,
        horizontalPartitionSpacerSize: Dp = this.horizontalPartitionSpacerSize,
        maxVerticalPartitions: Int = this.maxVerticalPartitions,
        verticalPartitionSpacerSize: Dp = this.verticalPartitionSpacerSize,
        defaultPanePreferredWidth: Dp = this.defaultPanePreferredWidth,
        excludedBounds: List<Rect> = this.excludedBounds,
    ): PaneScaffoldDirective
```

Returns a new copy of [PaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) with specified fields overwritten. Use this
method to create a custom [PaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) from the default instance or the result of
[calculatePaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/functions/calculatePaneScaffoldDirective).

#### Parameters

| | |
| --- | --- |
| maxHorizontalPartitions | the max number of partitions along the horizontal axis the layout can be split into. |
| horizontalPartitionSpacerSize | Size of the spacers between horizontal partitions. It's equivalent to the left/right margins the horizontal partitions. |
| maxVerticalPartitions | the max number of partitions along the vertical axis the layout can be split into. |
| verticalPartitionSpacerSize | Size of the spacers between vertical partitions. It's equivalent to the top/bottom margins of the vertical partitions. |
| defaultPanePreferredWidth | Default preferred width of panes that will be used by the scaffold if there's no [PaneScaffoldScope.preferredWidth](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/interfaces/PaneScaffoldScope) provided with a pane. |
| excludedBounds | the bounds of all areas in the window that the layout needs to avoid displaying anything upon it. Usually these bounds represent where physical hinges are. |

## Companion Object

#### Properties

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

```kotlin
val Default =
        PaneScaffoldDirective(
            maxHorizontalPartitions = 1,
            horizontalPartitionSpacerSize = 0.dp,
            maxVerticalPartitions = 1,
            verticalPartitionSpacerSize = 0.dp,
            defaultPanePreferredWidth = DefaultPreferredWidth,
            defaultPanePreferredHeight = DefaultPreferredHeight,
            excludedBounds = emptyList(),
        )
```

A default instance of [PaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) that suggests a single-pane layout that
occupies the full window. To create a customized [PaneScaffoldDirective](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective), you can use
[PaneScaffoldDirective.copy](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneScaffoldDirective) on the default instance to create a copy with custom values.