KwikTagsInput

fun KwikTagsInput(items: List<KwikTagsInputItem> = emptyList(), placeholder: String = "", onlySuggestions: Boolean = false, initialValues: List<KwikTagsInputItem> = emptyList(), withQuantity: Boolean = false, suggestionsAlwaysVisible: Boolean = false, onTagsChanged: (List<KwikTagsInputItem>) -> Unit, shape: Shape = MaterialTheme.shapes.medium, tagsItemShape: Shape = MaterialTheme.shapes.small, outlined: Boolean = false, tagsVerticalSpacing: Int = 4, tagsHorizontalSpacing: Int = 4, quantityCancelText: String = "Cancel", quantityDoneText: String = "Done", maxLines: Int = 4)

A component that allows the user to input tags with optional quantity.

Parameters

items

: List of available tags to choose from.

placeholder

: Placeholder text for the input field.

onlySuggestions

: If true, the user can only select from the suggestions.

initialValues

: Initial selected tags.

withQuantity

: If true, allows the user to specify a quantity for each tag.

suggestionsAlwaysVisible

: If true, the suggestions will always be visible. Note that all suggestions will be shown, provided the input field is empty. Otherwise, the suggestions will be filtered according to the input text.

onTagsChanged

: Callback that is called when the selected tags change.

shape

: Shape of the input field. Applies to the tag items as well.

tagsItemShape

: Shape of the tag items.

outlined

: If true, the input field will be outlined. Else it's filled. Refer to KwikOutlinedTextField and KwikTextField.

tagsVerticalSpacing

: Vertical spacing between tags.

tagsHorizontalSpacing

: Horizontal spacing between tags.

quantityCancelText

: Text for the cancel button in the quantity dialog.

quantityDoneText

: Text for the done button in the quantity dialog.