Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
data class KwikTagsInputItem(val id: Any, val label: String, val quantity: Int = 1, val minQuantity: Int = 1, val maxQuantity: Int = 100)

Holds the data for each tag item.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun KwikOTP(modifier: Modifier = Modifier, onValidOTP: (TextFieldValue) -> Unit, size: Int = 6, isError: Boolean = false, error: String, visualTransformation: VisualTransformation = VisualTransformation.None, clearAll: Boolean = false, shape: Shape = MaterialTheme.shapes.small, colors: TextFieldColors = kwikTextFieldColors(), onKeyboardDone: () -> Unit = { })

OTP input. The OTP field will automatically move focus to the next field when a digit is entered.

Link copied to clipboard
fun KwikOutlinedOTP(onValidOTP: (TextFieldValue) -> Unit, size: Int = 6, isError: Boolean = false, error: String, visualTransformation: VisualTransformation = VisualTransformation.None, clearAll: Boolean = false, shape: Shape = MaterialTheme.shapes.small, colors: TextFieldColors = kwikOutlinedTextFieldColors(), onKeyboardDone: () -> Unit = { })

OTP input. The OTP field will automatically move focus to the next field when a digit is entered.

Link copied to clipboard
fun KwikOutlinedPhoneNumberField(modifier: Modifier = Modifier, value: MutableState<TextFieldValue>, onValueChange: (TextFieldValue) -> Unit, onKeyboardDone: () -> Unit = { }, label: String? = null, shape: Shape = MaterialTheme.shapes.medium, isError: Boolean = false, error: String = "", singleLine: Boolean = true, maxLines: Int = 1, imeAction: ImeAction = ImeAction.Done, initialCountryInfo: KwikCountryInfo, isValid: Boolean = false, enabled: Boolean = true, countrySelectable: Boolean = true, colors: TextFieldColors = kwikOutlinedTextFieldColors(enabled), onCountrySelected: (KwikCountryInfo) -> Unit = {}, countryPickerTitle: String = "Where are you from?", showFlags: Boolean = false, showCountryCode: Boolean = false, showDialingCode: Boolean = true)

A powerful phone number field that allows the user to select a country code from a list of countries. The field is outlined and has a leading icon that shows the selected country code. The field also has a trailing icon that shows a check mark if the phone number is valid.

Link copied to clipboard
fun KwikOutlinedTextField(modifier: Modifier = Modifier, value: MutableState<TextFieldValue>, onValueChange: (TextFieldValue) -> Unit, onKeyboardDone: () -> Unit = { }, onActionClick: () -> Unit = { }, onFocusChanged: (Boolean) -> Unit = { }, visualTransformation: VisualTransformation = VisualTransformation.None, isEditable: Boolean = true, placeholder: String, shape: Shape = MaterialTheme.shapes.medium, isError: Boolean = false, error: String = "Field is required", singleLine: Boolean = true, maxLength: Int = 65, keyboardType: KeyboardType = KeyboardType.Text, keyboardActions: KeyboardActions = KeyboardActions( onDone = { onKeyboardDone() } ), maxLines: Int = 1, allowedChars: Regex? = AllowedChars.ALL, imeAction: ImeAction = ImeAction.Done, isValid: Boolean = false, isTextCounterShown: Boolean = false, hint: Any? = null, hintVisibleOnError: Boolean = false, leadingIcon: Any? = null, trailingIcon: Any? = null, showClearTextButton: Boolean = false, isLoading: Boolean = false, isBigTextField: Boolean = false, enabled: Boolean = true, textStyle: TextStyle = MaterialTheme.typography.bodyMedium, suggestionsModifier: Modifier = Modifier, onSuggestionSelected: (String) -> Unit = {}, suggestions: List<String> = listOf(), suggestionsContainerColor: Color = MaterialTheme.colorScheme.surface, delay: Boolean = false, delayDuration: Long = 500, colors: TextFieldColors = kwikOutlinedTextFieldColors(enabled))

A versatile filled text field component that can be used to take user input.

Link copied to clipboard
fun KwikPhoneNumberField(modifier: Modifier = Modifier, value: MutableState<TextFieldValue>, onValueChange: (TextFieldValue) -> Unit, onKeyboardDone: () -> Unit = { }, label: String? = null, shape: Shape = MaterialTheme.shapes.medium, isError: Boolean = false, error: String = "", singleLine: Boolean = true, maxLines: Int = 1, imeAction: ImeAction = ImeAction.Done, initialCountryInfo: KwikCountryInfo, isValid: Boolean = false, enabled: Boolean = true, countrySelectable: Boolean = true, colors: TextFieldColors = kwikTextFieldColors(), onCountrySelected: (KwikCountryInfo) -> Unit = {}, countryPickerTitle: String = "Where are you from?", showFlags: Boolean = false, showCountryCode: Boolean = false, showDialingCode: Boolean = true)

A powerful phone number field that allows the user to select a country code from a list of countries. The field is outlined and has a leading icon that shows the selected country code. The field also has a trailing icon that shows a check mark if the phone number is valid.

Link copied to clipboard
fun KwikSearchView(modifier: Modifier = Modifier, state: MutableState<TextFieldValue>, placeholder: String = "Search", label: String? = null, delay: Boolean = false, delayDuration: Long = 500, maxChars: Int = 30, isError: Boolean = false, error: String? = null, textStyle: TextStyle = MaterialTheme.typography.bodyMedium, onTextChange: (String) -> Unit, onTextCleared: () -> Unit = {}, onFocusChanged: (Boolean) -> Unit = {}, onKeyboardDone: () -> Unit = {}, suggestionsModifier: Modifier = Modifier, onSuggestionSelected: (String) -> Unit = {}, suggestions: List<String> = listOf(), suggestionsContainerColor: Color = kwikFilledColorResolver(), colors: TextFieldColors = kwikTextFieldColors().copy( focusedIndicatorColor = Color.Transparent, unfocusedIndicatorColor = Color.Transparent ), shape: Shape = MaterialTheme.shapes.medium)

A search view that allows users to search for items.

Link copied to clipboard
fun KwikTagChip(tag: KwikTagsInputItem, withQuantity: Boolean, quantity: Int, onQuantityChange: (Int) -> Unit, onRemove: () -> Unit, shape: Shape = MaterialTheme.shapes.medium, quantityCancelText: String, quantityDoneText: String)
Link copied to clipboard
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.

Link copied to clipboard
fun KwikTextField(modifier: Modifier = Modifier, value: MutableState<TextFieldValue>, onValueChange: (TextFieldValue) -> Unit, onKeyboardDone: () -> Unit = { }, onActionClick: () -> Unit = { }, onFocusChanged: (Boolean) -> Unit = { }, visualTransformation: VisualTransformation = VisualTransformation.None, isEditable: Boolean = true, label: String? = null, placeholder: String, shape: Shape = MaterialTheme.shapes.medium, isError: Boolean = false, error: String = "Field is required", singleLine: Boolean = true, maxLength: Int = 65, keyboardType: KeyboardType = KeyboardType.Text, keyboardActions: KeyboardActions = KeyboardActions( onDone = { onKeyboardDone() } ), maxLines: Int = 1, allowedChars: Regex? = AllowedChars.ALL, imeAction: ImeAction = ImeAction.Done, isValid: Boolean = false, isTextCounterShown: Boolean = false, hint: Any? = null, hintVisibleOnError: Boolean = false, leadingIcon: Any? = null, trailingIcon: Any? = null, showClearTextButton: Boolean = false, isLoading: Boolean = false, isBigTextField: Boolean = false, enabled: Boolean = true, colors: TextFieldColors = kwikTextFieldColors(isEditable), textStyle: TextStyle = MaterialTheme.typography.bodyMedium, suggestionsModifier: Modifier = Modifier, onSuggestionSelected: (String) -> Unit = {}, suggestions: List<String> = listOf(), suggestionsContainerColor: Color = MaterialTheme.colorScheme.surface, delay: Boolean = false, delayDuration: Long = 500)

A versatile filled text field component that can be used to take user input.

Link copied to clipboard
Link copied to clipboard
fun PasswordToggle(passwordVisible: Boolean, onClick: () -> Unit)