TabGroup

fun TabGroup(modifier: Modifier = Modifier, spacedEvenly: Boolean = true, selectedTabIndex: Int = 0, intent: TabIntent = TabDefaults.SelectedContentIntent, tabs: @Composable () -> Unit)

Spark tabs.

A TabGroup contains a row of Tabs, and displays an indicator underneath the currently selected tab. Depending on the available place and @param spacedEvenly a TabGroup places its tabs evenly spaced along the entire row, with each tab taking up an equal amount of space unless content cannot be fully displayed. In this case each larger tab is attributed a needed space and the rest is distributed evenly among smaller tabs. If there is not enough screen space to display all content @param spacedEvenly is ignored and TabGroup does not enforce equal size and allows scrolling to tabs that do not fit on screen. Each tab takes the needed space ensuring the minimum tab size constraint is met.

Parameters

selectedTabIndex

the index of the currently selected tab

modifier

the Modifier to be applied to this tab row

spacedEvenly

determines whether thetabs should be measured and placed evenly across the group, each taking up equal space if enough space is available.

intent

one of TabIntents to be applied to the selected tab This provides a layer of separation between the tab row and the content displayed underneath.

tabs

the tabs inside this tab group. Typically this will be multiple Tabs. Each element inside this lambda will be measured and placed evenly across the row, each taking up equal space.