Extra
TabRow
A FormaUI tab row — switches between a small number of related content destinations, delegating to Material 3's PrimaryTabRow/SecondaryTabRow (or their scrollable equivalents).
dev.formaui.components.tabs
Preview
This toggle is site chrome only — the preview has its own light/dark switch inside.
Live preview
Live preview — ~37 MB development build
Usage
var selectedTab by remember { mutableStateOf(0) }
FormaTabRow(selectedTabIndex = selectedTab) {
FormaTab(selected = selectedTab == 0, onClick = { selectedTab = 0 }, text = { Text("Chat") })
FormaTab(selected = selectedTab == 1, onClick = { selectedTab = 1 }, text = { Text("Calls") })
}FormaTabRow
Stateless tab row covering both indicator emphases (variant) and fixed vs. scrollable layout (scrollable) in one entry point.
FormaTab
A single tab; delegates to Material 3's Tab, or to LeadingIconTab automatically when both text and icon are supplied.
Supporting API
- FormaTabRowVariantenum
- Indicator style; values: Primary (bold pill indicator, top-level navigation), Secondary (slim underline, views within one destination).
Accessibility
Role.Tab selection semantics and the 48dp touch target come from Material 3's PrimaryTabRow/SecondaryTabRow (and their scrollable equivalents). A FormaTab given only an icon and no text has no accessible label — supply a contentDescription on the icon in that case.