Skip to content

TabPanel

@Composable



fun TabPanel(
    modifier: Modifier = Modifier, 
    state: TabContainerState? = null, 
    onTabSelected: (TabSpec) -> Unit = {}, 
    tabSpacing: Int = 2, 
    scrollable: Boolean = true, 
    scrollState: ScrollableState? = null, 
    contentWrapper: @Composable



 (@Composable



 () -> Unit) -> Unit? = null, 
    builder: TabContainerScope.() -> Unit
)

A TabContainer whose selected tab content is wrapped in a Panel by default, elevated (drawn above neighboring tabs) when selected. Used by TabContainerPanel.

Parameters

  • contentWrapper: Wraps each tab's content; defaults to a Panel offset to sit flush under the tab row.

  • builder: Declares the tabs, in order, via TabContainerScope.tab.