Button

fun Button(label: String, onClick: () -> Unit, modifier: Modifier = Modifier, value: String? = null, style: ButtonStyle = LocalButtonStyle.current, spacing: ButtonSpacing = ButtonSpacing.Packed, icons: ButtonIcons? = null, enabled: Boolean = true, loading: Boolean = false, indication: Indication? = LocalIndication.current, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClickLabel: String? = null, motion: Motion<ButtonMotionStyle> = rememberButtonMotion( motionContext = rememberMotionContext(interactionSource), ))

Кнопка с текстом и иконкой. Если loading == true, кнопка отобразит круглый индикатор загрузки. Кнопка умеет отобрать иконки в начале и в конце.

Parameters

label

текст кнопки

onClick

обработчик нажатий

modifier

модификатор

style

стиль кнопки

value

доп. текст кнопки

icons

иконки

spacing

вид отступа между label и value

enabled

флаг доступности кнопки

loading

флаг загрузки

interactionSource

источник взаимодействий MutableInteractionSource

onClickLabel

надпись для Accessibility

motion

объект анимаций