androidx.compose.material3.adaptive.layout

PaneScaffoldScope

Sealed interface · from org.jetbrains.compose.material3.adaptive:adaptive-layout:1.3.0

No hand-written docs yet.

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

sealed interface PaneScaffoldScope

Kinds of PaneScaffoldScope

Anywhere a PaneScaffoldScope is expected, you can pass any of these.

How to get one

Or create one of the kinds listed above.

Properties

saveableStateHolderSince 1.2

val saveableStateHolder: SaveableStateHolder

The saveable state holder to save pane states across their visibility life-cycles. The default pane implementations like AnimatedPane are supposed to use it to store states.

Functions

preferredWidth

fun Modifier.preferredWidth(width: Dp): Modifier

This modifier specifies the preferred width for a pane in Dps, 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 are supposed to be used.

fun Modifier.preferredWidth(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.

preferredHeightSince 1.1

fun Modifier.preferredHeight(height: Dp): Modifier

This modifier specifies the preferred height for a pane in Dps, 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 are supposed to be used.

fun Modifier.preferredHeight(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.

paneExpansionDraggableSince 1.1

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 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.

paneMarginsSince 1.3Experimental

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

This modifier specifies the associated pane's margins according to the provided 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.

@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 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.

Library docs

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