Package-level declarations

JengaNavigationBar with its items, and JengaNavigationRailItem.

Types

Link copied to clipboard
class JengaNavigationBarColors(val container: Color, val divider: Color, val selectedContent: Color, val unselectedContent: Color, val disabledContent: Color, val selectedIndicator: Color, val selectedIndicatorContent: Color)

Resolved colors for a JengaNavigationBar. Override via JengaNavigationBarDefaults.colors.

Link copied to clipboard

Defaults and token mappings for JengaNavigationBar.

Link copied to clipboard
class JengaNavigationRailItemColors(val selectedContainer: Color, val selectedContent: Color, val unselectedContent: Color, val disabledContent: Color, val dot: Color)
Link copied to clipboard

Defaults and token mappings for JengaNavigationRailItem. The composable members follow the theme's JengaNavigationRailItemStyle; the constants are Jenga's built-in values, and JengaNavigationRailItem resolves the theme's values over them.

Link copied to clipboard
class JengaNavigationRailItemStyle(val minHeight: Dp? = null, val shape: Shape? = null, val contentPadding: PaddingValues? = null, val textStyle: TextStyle? = null, val selectedTextStyle: TextStyle? = null, val colors: JengaNavigationRailItemColors? = null)

Theme-wide style for every JengaNavigationRailItem, set through io.github.joelkanyi.jenga.theme.JengaComponentStyles.navigationRailItem. A null value keeps Jenga's default; arguments passed to a call still win.

Link copied to clipboard

How a JengaNavigationBarItem marks the selected state.

Functions

Link copied to clipboard
fun JengaNavigationBar(modifier: Modifier = Modifier, colors: JengaNavigationBarColors = JengaNavigationBarDefaults.colors(), content: @Composable RowScope.() -> Unit)

A bottom navigation bar. Place JengaNavigationBarItems in content; each is weighted equally. Applies the navigation-bar inset itself.

Link copied to clipboard
fun RowScope.JengaNavigationBarItem(selected: Boolean, onClick: () -> Unit, icon: @Composable () -> Unit, modifier: Modifier = Modifier, label: String? = null, enabled: Boolean = true, indicator: JengaNavIndicator = JengaNavIndicator.None, colors: JengaNavigationBarColors = JengaNavigationBarDefaults.colors())

A single item in a JengaNavigationBar: an icon, optional label, and selected state. Must be used inside JengaNavigationBar's content scope.

Link copied to clipboard
fun JengaNavigationRailItem(label: String, selected: Boolean, onClick: () -> Unit, icon: @Composable () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, showDot: Boolean = false, minHeight: Dp = JengaTheme.components.navigationRailItem?.minHeight ?: JengaNavigationRailItemDefaults.MinHeight, shape: Shape = JengaNavigationRailItemDefaults.shape, contentPadding: PaddingValues = JengaNavigationRailItemDefaults.contentPadding, textStyle: TextStyle = JengaNavigationRailItemDefaults.textStyle, selectedTextStyle: TextStyle = textStyle.merge(JengaTheme.components.navigationRailItem?.selectedTextStyle), colors: JengaNavigationRailItemColors = JengaNavigationRailItemDefaults.colors())

A full-width destination row for a side navigation list (e.g. the rail of a landscape or tablet layout): an icon and a label, with a filled background when selected. Stack items in a column; the caller owns the layout.