AddonScope

abstract class AddonScope

Scope that provide pre-made addons for leading and trailing contents of TextField.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun Button(text: String, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, icon: SparkIcon? = null, isLoading: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

A Button that can be used as trailing content for a TextField. The button is a custom one as a regular one doesn't fit so it has a more limited api than a Spark button.

Link copied to clipboard
fun Dropdown(expanded: Boolean, onExpandedChange: (Boolean) -> Unit, onDismissRequest: () -> Unit, dropdownLabel: @Composable RowScope.() -> Unit, modifier: Modifier = Modifier, properties: PopupProperties = PopupProperties(), popupDropdownContent: @Composable ColumnScope.() -> Unit)

A dropdown that can be used as a leading or trailing content for a TextField that show a dropdown on touch.

Link copied to clipboard
fun TextFieldIcon(icon: SparkIcon, contentDescription: String?, modifier: Modifier = Modifier)

An icon that can be used as leading or trailing content for a TextField. Its size is fixed to 16dp to not change the height of the TextField. Its color is fixed to neutral.

Link copied to clipboard
fun TextFieldIconButton(onClick: () -> Unit, icon: SparkIcon, contentDescription: String?, modifier: Modifier = Modifier, enabled: Boolean = true, colors: IconButtonColors = IconButtonDefaults.iconButtonColors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

An icon ghost button that can be used as leading or trailing content for a TextField. It's color is fixed to neutral.

Link copied to clipboard
fun TextFieldIconToggleButton(checked: Boolean, onCheckedChange: (Boolean) -> Unit, unCheckedIcon: SparkIcon, checkedIcon: SparkIcon, contentDescription: String?, modifier: Modifier = Modifier, enabled: Boolean = true, colors: IconToggleButtonColors = IconButtonDefaults.iconToggleButtonColors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

An icon ghost toggle button that can be used as leading or trailing content for a TextField. It's color is fixed to neutral.

Link copied to clipboard
fun TextFieldText(text: String, modifier: Modifier = Modifier)

A text that can be used as a prefix or suffix for a TextField. Only use SparkColors.onSurface color.