ChipDefaults

Contains default values used by Chip.

Properties

Link copied to clipboard

The corner radius of a chip. COUIChipDrawable resolves the default chipCornerRadius (-1) to half of the background height, i.e. a capsule for the default 32dp height.

Link copied to clipboard

The size of the leading icon (COUI coui_chip_selection_style_chip_icon_size).

Link copied to clipboard

The spacing between the icon and the label (COUI coui_chip_selection_style_chip_icon_end_padding).

Link copied to clipboard

The horizontal padding inside a chip (COUI coui_chip_selection_style_chip_horizontal_padding; the icon start padding shares the same 12dp value).

Link copied to clipboard

The maximum width of a chip (COUI coui_chip_default_max_width).

Link copied to clipboard

The minimum height of a chip (COUI coui_chip_selection_style_height).

Link copied to clipboard

The minimum width of a chip (COUI coui_chip_default_min_width).

Link copied to clipboard

The maximum width of the label (COUI coui_chip_default_max_text_width / chipTextMaxWidth).

Functions

Link copied to clipboard
fun chipColors(containerColor: Color = COUITheme.colorScheme.secondaryVariant, selectedContainerColor: Color = COUITheme.colorScheme.primary, disabledContainerColor: Color = COUITheme.colorScheme.disabledSecondaryVariant, selectedDisabledContainerColor: Color = COUITheme.colorScheme.disabledPrimaryButton, contentColor: Color = COUITheme.colorScheme.onSurface, selectedContentColor: Color = COUITheme.colorScheme.onPrimary, disabledContentColor: Color = COUITheme.colorScheme.disabledOnSecondaryVariant, selectedDisabledContentColor: Color = COUITheme.colorScheme.disabledOnPrimaryButton): ChipColors

The default ChipColors, mapping the Widget.COUI.Chip color attributes: uncheckedBackgroundColor/uncheckedDisabledBackgroundColor = couiColorContainer8, checkedBackgroundColor = couiColorPrimary, checkedDisabledBackgroundColor = couiColorDisable, uncheckedTextColor = couiColorLabelPrimary, checkedTextColor = couiColorLabelOnColor and the chip_checked/unchecked_text_disable_color selectors.

Link copied to clipboard

The default text style of the label (COUI Widget.COUI.Chip.Selection textAppearance couiTextBodyM: 14sp).