Package-level declarations

Types

Link copied to clipboard

Default values and stock content of NutrientTabBar, the Compose home of the pspdf__TabBar style defaults.

Link copied to clipboard
data class NutrientTabBarDimensions(val height: Dp, val tabMinWidth: Dp, val textSize: TextUnit, val separatorWidth: Dp, val tabHorizontalPadding: Dp, val closeButtonPadding: Dp)

Dimensions of a NutrientTabBar. Create one with NutrientTabBarDefaults.dimensions.

Link copied to clipboard
data class NutrientTabBarTab(val id: Long, val title: String)

A tab shown by NutrientTabBar.

Link copied to clipboard

What a NutrientTabBar hands its tabContent slot: the tab to render, its state, and the bar's styling.

Functions

Link copied to clipboard
fun NutrientTabBar(documentCoordinator: DocumentCoordinator, modifier: Modifier = Modifier, closeMode: PdfTabBarCloseMode = PdfTabBarCloseMode.CLOSE_ONLY_SELECTED_TAB, colors: TabBarColors = UiTheme.colors.tabBar, dimensions: NutrientTabBarDimensions = NutrientTabBarDefaults.dimensions(), tabShape: Shape = NutrientTabBarDefaults.TabShape, tabSpacing: Dp = NutrientTabBarDefaults.TabSpacing, contentPadding: PaddingValues = NutrientTabBarDefaults.ContentPadding, windowInsets: WindowInsets = NutrientTabBarDefaults.windowInsets, listState: LazyListState = rememberLazyListState(), tabContent: @Composable NutrientTabBarTabScope.() -> Unit = { NutrientTabBarDefaults.TabContent(this) })

A tab bar for the documents of a DocumentCoordinator, one tab per document.

fun NutrientTabBar(tabs: List<NutrientTabBarTab>, selectedTabId: Long?, onTabClick: (NutrientTabBarTab) -> Unit, onCloseClick: (NutrientTabBarTab) -> Unit, modifier: Modifier = Modifier, closeMode: PdfTabBarCloseMode = PdfTabBarCloseMode.CLOSE_ONLY_SELECTED_TAB, colors: TabBarColors = UiTheme.colors.tabBar, dimensions: NutrientTabBarDimensions = NutrientTabBarDefaults.dimensions(), tabShape: Shape = NutrientTabBarDefaults.TabShape, tabSpacing: Dp = NutrientTabBarDefaults.TabSpacing, contentPadding: PaddingValues = NutrientTabBarDefaults.ContentPadding, windowInsets: WindowInsets = NutrientTabBarDefaults.windowInsets, onTabMove: (fromIndex: Int, toIndex: Int) -> Boolean? = null, listState: LazyListState = rememberLazyListState(), tabContent: @Composable NutrientTabBarTabScope.() -> Unit = { NutrientTabBarDefaults.TabContent(this) })

A horizontal row of tabs driven by the caller's own state.