Kwik Filter Chips
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
pre Selection
Optional Set of options that can be pre-selected.
multi Selection
Boolean if multiple options can be selected
selected Container Color
Color of the chip when selected
unselected Container Color
Color of the chip when unselected
selected Content Color
Color of the text when selected
unselected Content Color
Color of the text when unselected
border
BorderStroke border stroke of the chip
shape
Shape shape of the chip
show Checked Icon
Boolean if the checked icon should be shown
flow Layout
Boolean if the chips should be displayed in a flow layout
flow Layout Vertical Arrangement
Int vertical arrangement of the flow layout
flow Layout Horizontal Arrangement
Int horizontal arrangement of the flow layout