KwikHorizontalTabs

fun KwikHorizontalTabs(tabs: List<KwikTabItem>, pagerState: PagerState, containerColor: Color = MaterialTheme.colorScheme.surface, indicatorColor: Color = MaterialTheme.colorScheme.primary, kwikIndicatorProps: KwikIndicatorProps = KwikIndicatorProps(), divider: @Composable () -> Unit = {}, selectedContentColor: Color = MaterialTheme.colorScheme.primary, unselectedContentColor: Color = Color.Gray)

A versatile horizontal tab pager capable of displaying any content. Can be used independently or with a pager.

Parameters

tabs

List of tabs to display

pagerState

The state of the pager

kwikIndicatorProps

The properties of the indicator. Refer to KwikIndicatorProps for more details.

containerColor

The background color of the tab row

indicatorColor

The color of the indicator

divider

The divider to display between tabs

selectedContentColor

The color of the selected tab

unselectedContentColor

The color of the unselected tab

Usage example:

val list = listOf(
KwikTabItem(
title = "Muraho",
content = {
Text(text = "Muraho")
}
),
KwikTabItem(
title = "Hello",
content = {
Text(text = "Hello")
}
),
KwikTabItem(
title = "Jambo",
content = {
Text(text = "Jambo")
}
)
)

val pagerState = rememberPagerState(
initialPage = 0,
initialPageOffsetFraction = 0f
) {
list.size
}

KwikHorizontalTab(
tabs = list,
pagerState = pagerState
)
```