Stylish Chip
A standalone Stylish chip with the same visual language as the connected-chip family — animated selection colors, Role.Tab semantics, interactive elevation, and a haptic pulse on tap — but without any connected-group geometry. Use this when a single chip is needed outside a StylishConnectedChipRow, StylishConnectedChipColumn, or StylishConnectedChipGrid.
For the StylishChipVariant.Filter variant, a checkmark is rendered automatically before the label when selected is true and no leadingContent is provided. For the StylishChipVariant.Input variant, the container defaults to surfaceVariant and a trailing close affordance can be supplied via trailingContent.
When onClick is null the chip is display-only: no Role.Tab semantics, no ripple, and no elevation lift. When enabled is false, the chip is announced as disabled via semantics. When actionable, a Material-style state layer (see Modifier.stylishStateLayer) darkens the surface on hover and press, and a primary-colored focus ring (see Modifier.stylishFocusRing) is drawn around the chip while it holds keyboard focus.
The selected/unselected color transition animates with StylishTheme.animation.durationShort; when the platform requests reduced motion (see isStylishReducedMotionEnabled) the color snaps to its target instead of tweening.
Testing
The root carries the default test tag stylish_chip for UI tests. Callers can override it by passing their own Modifier.testTag(...) in modifier.
Parameters
Text displayed on the chip in structured mode. Ignored in content mode. Defaults to "".
Called when the chip is tapped. null makes the chip display-only.
Modifier applied to the Surface root.
The visual role of the chip (see StylishChipVariant).
When true, the chip renders in the selected color scheme. For the StylishChipVariant.Filter variant, also renders an automatic checkmark when leadingContent is null.
When false, the chip ignores pointer input, renders at zero elevation, is announced as disabled, and is visually dimmed with disabledContainerColor and disabledContentColor regardless of selected.
The MutableInteractionSource for the chip, used to observe press/focus/hover interactions. When null, an internal one is remembered.
Corner shape. Defaults to RoundedCornerShape with StylishTheme.dimensions.connectedCornerRadius.
Maximum lines for label in structured mode.
Overflow strategy for label in structured mode.
Text style for label in structured mode.
Background color when selected.
Content color when selected.
Background color when unselected. When null (default), resolved from variant: surfaceVariant for StylishChipVariant.Input and stylishComponentColors.groupedContainer otherwise.
Content color when unselected.
Background color used when enabled is false, visually dimming the chip. Defaults to MaterialTheme.colorScheme.surfaceVariant.
Content color used when enabled is false, visually dimming the chip. Defaults to MaterialTheme.colorScheme.onSurfaceVariant.
Inner padding of the chip.
Gap between leading slot, label, and trailing slot in structured mode. Defaults to StylishTheme.dimensions.inlineSpacing.
Optional content before the label in structured mode. Ignored in content mode. For the filter variant, a provided leading content replaces the automatic checkmark.
Optional content after the label in structured mode. Ignored in content mode. Use this for the StylishChipVariant.Input close affordance.
When non-null, replaces the entire structured row (leading + label + trailing) with caller-supplied content. Receives RowScope for weight/alignment control. When null (default), the structured row is rendered.