NutrientMainToolbarDefaults

Defaults for NutrientMainToolbar, one per parameter, so a host overrides one value and inherits the rest — the TopAppBarDefaults shape. The Floating… values are the matching set for a toolbar composed as a pill over the document rather than docked to the window edge.

The toolbar has no width parameter: it is as wide as its content, and grows when a piece of that content fills the width (the default search bar does, with Modifier.fillMaxWidth()). A caller's width modifier wins over both, so Modifier.fillMaxWidth() is the full-bleed bar and Modifier.width(240.dp) is a fixed one.

Properties

Link copied to clipboard

The show animation: sliding down from past the top edge, matching the View toolbar.

Link copied to clipboard

The hide animation: sliding up past the top edge, matching the View toolbar.

Link copied to clipboard

A floating toolbar's clearance from the edge it is anchored to, as Modifier.padding.

Link copied to clipboard

A floating toolbar's shadow elevation, higher than the docked bar's.

Link copied to clipboard

The shape of a floating toolbar — a 28dp pill.

Link copied to clipboard

How the items indicate press, hover and selection — ToolbarItemIndication.Default.

Link copied to clipboard

No insets at all — for a toolbar whose container already consumed the window insets (a windowInsetsPadding on the Box that positions a floating pill, say), so the strip is never reserved twice.

Link copied to clipboard

The docked bar's shadow elevation, from the pspdf__toolbar_elevation dimension.

Link copied to clipboard

The shape of the SDK-mounted bar: square, because it spans the window edge to edge.

Link copied to clipboard

NutrientMainToolbarTitle's text style: the ambient text style at the View toolbar's 20sp.

Functions

Link copied to clipboard

The toolbar's colors from the ambient com.pspdfkit.compose.theme.NutrientTheme — the XML theme's action-bar colors unless the host supplied a scheme. Override one with copy: NutrientMainToolbarDefaults.colors().copy(backgroundColor = …).

Link copied to clipboard

NutrientMainToolbar's default insets: the ones coordinator carries in its frame (com.pspdfkit.compose.toolbar.state.ToolbarFrame.insets, settable with ToolbarCoordinator.setMainToolbarInsets), unioned with the side system bars.