KwikFilterChips

fun <T> KwikFilterChips(filters: List<KwikFilterChipOption<T>>, preSelection: Set<T>, filtersUpdated: (List<T>) -> Unit, multiSelection: Boolean = false, selectedContainerColor: Color = MaterialTheme.colorScheme.primary, unselectedContainerColor: Color = if(isSystemInDarkTheme()) Color.DarkGray else Color.LightGray, selectedContentColor: Color = Color.White, unselectedContentColor: Color = if(isSystemInDarkTheme()) Color.White else Color.Black, border: BorderStroke = BorderStroke( width = 0.dp, color = Color.Transparent ), shape: Shape = MaterialTheme.shapes.medium, showCheckedIcon: Boolean = false, flowLayout: Boolean = false, flowLayoutVerticalArrangement: Int = 0, flowLayoutHorizontalArrangement: Int = 2)

A filter chip component with multi-selection support

Parameters

filters

List of filter options to display

preSelection

Optional Set of options that can be pre-selected.

filtersUpdated

Unit Callback when filter options are updated. Returns a list of selected values of type T

multiSelection

Boolean if multiple options can be selected

selectedContainerColor

Color of the chip when selected

unselectedContainerColor

Color of the chip when unselected

selectedContentColor

Color of the text when selected

unselectedContentColor

Color of the text when unselected

border

BorderStroke border stroke of the chip

shape

Shape shape of the chip

showCheckedIcon

Boolean if the checked icon should be shown

flowLayout

Boolean if the chips should be displayed in a flow layout

flowLayoutVerticalArrangement

Int vertical arrangement of the flow layout

flowLayoutHorizontalArrangement

Int horizontal arrangement of the flow layout