Nutrient Tab Bar Defaults
Default values and stock content of NutrientTabBar, the Compose home of the pspdf__TabBar style defaults.
Properties
Duration of the tab insert, remove and placement animations. A bar bound to a DocumentCoordinator defers the document switch that follows a tap or a close by this much so the animation isn't frozen by it.
Padding between the close button and the tab's end edge (pspdf__tab_bar_item_close_button_padding).
Width and height of the close button; pspdf__ic_close is scaled down to it.
Padding around the row of tabs, inside the bar's background.
Width of the separator between touching tabs (pspdf__tab_bar_item_margin_width).
Padding on both sides of a tab title (pspdf__tab_bar_item_horizontal_padding).
Minimum width of a tab's title area (pspdf__tab_bar_minimum_width).
Gap between neighbouring tabs. Touching tabs show a separator instead, see NutrientTabBarDimensions.separatorWidth.
The insets a bar at a screen edge keeps its tabs clear of: the horizontal system bars and display cutout. The bar's background still extends into them. Pass WindowInsets(0, 0, 0, 0) to a bar whose host applies insets.
Functions
The stock close button: an icon that closes the tab when tapped, with an unbounded ripple in its tint. Padded from the tab's end edge by NutrientTabBarDimensions.closeButtonPadding; add to that through modifier.
Dimensions for a NutrientTabBar, every one defaulting to the value the SDK's own tab bar uses.
The stock tab content: the title, middle-ellipsized to one line, and a close button when the tab is closeable. Call it from a custom tabContent slot to decorate the stock look rather than replace it.