Package-level declarations

JengaChip: a selectable chip with an optional leading icon and trailing content.

Types

Link copied to clipboard
class JengaChipColors(val selectedContainer: Color, val selectedContent: Color, val unselectedContainer: Color, val unselectedContent: Color, val unselectedBorder: Color, val disabledContainer: Color, val disabledContent: Color, val selectedBorder: Color = Color.Transparent)

Resolved colors for a JengaChip across its states. Override via JengaChipDefaults.colors.

Link copied to clipboard

Defaults and token mappings for JengaChip. Override any of these per call.

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

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

Functions

Link copied to clipboard
fun JengaChip(label: String, selected: Boolean, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, leadingIcon: @Composable () -> Unit? = null, shape: Shape = JengaChipDefaults.shape, colors: JengaChipColors = JengaChipDefaults.colors(), trailingContent: @Composable () -> Unit? = null, textStyle: TextStyle = JengaChipDefaults.textStyle, selectedTextStyle: TextStyle = textStyle.merge(JengaTheme.components.chip?.selectedTextStyle), minHeight: Dp = JengaTheme.components.chip?.minHeight ?: JengaChipDefaults.MinHeight, contentPadding: PaddingValues = JengaChipDefaults.contentPadding, iconSpacing: Dp = JengaChipDefaults.iconSpacing)

A compact, toggleable chip for filters and selections.