ButtonFilled

fun ButtonFilled(onClick: () -> Unit, modifier: Modifier = Modifier, size: ButtonSize = ButtonSize.Medium, shape: ButtonShape = SparkButtonDefaults.DefaultShape, intent: ButtonIntent = ButtonIntent.Main, enabled: Boolean = true, icon: SparkIcon? = null, iconSide: IconSide = IconSide.START, isLoading: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: @Composable RowScope.() -> Unit)

The filled button should only be used once per view (not including a modal dialog), these buttons have the most emphasis.

The minimal usage of the component is the text of the button but you can add an icon or indicate a loading state after a click action for example.

Parameters

onClick

Will be called when the user clicks the button

modifier

Modifier to be applied to the button

size

The size of the button

intent

The intent color for the button.

enabled

Controls the enabled state of the button. When false, this button will not be clickable

icon

The optional icon to be displayed at the start or the end of the button container.

iconSide

If an icon is added, you can configure the side where is should be displayed, at the start or end of the button

isLoading

show or hide a CircularProgressIndicator at the start that push the content to indicate a loading state

interactionSource

the MutableInteractionSource representing the stream of Interactions for this button. You can create and pass in your own remembered instance to observe Interactions and customize the appearance / behavior of this button in different states.

Samples

com.adevinta.spark.samples.components.ButtonSample
fun ButtonFilled(onClick: () -> Unit, text: String, modifier: Modifier = Modifier, size: ButtonSize = ButtonSize.Medium, shape: ButtonShape = SparkButtonDefaults.DefaultShape, intent: ButtonIntent = ButtonIntent.Main, enabled: Boolean = true, icon: SparkIcon? = null, iconSide: IconSide = IconSide.START, isLoading: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

The filled button should only be used once per view (not including a modal dialog), these buttons have the most emphasis.

The minimal usage of the component is the text of the button but you can add an icon or indicate a loading state after a click action for example.

Parameters

onClick

Will be called when the user clicks the button

text

The text to be displayed in the button

modifier

Modifier to be applied to the button

size

The size of the button

intent

The intent color for the button.

enabled

Controls the enabled state of the button. When false, this button will not be clickable

icon

The optional icon to be displayed at the start or the end of the button container.

iconSide

If an icon is added, you can configure the side where is should be displayed, at the start or end of the button

isLoading

show or hide a CircularProgressIndicator at the start that push the content to indicate a loading state

interactionSource

the MutableInteractionSource representing the stream of Interactions for this button. You can create and pass in your own remembered instance to observe Interactions and customize the appearance / behavior of this button in different states.

Samples

com.adevinta.spark.samples.components.ButtonSample
fun ButtonFilled(onClick: () -> Unit, text: AnnotatedString, modifier: Modifier = Modifier, size: ButtonSize = ButtonSize.Medium, intent: ButtonIntent = ButtonIntent.Main, enabled: Boolean = true, icon: SparkIcon? = null, iconSide: IconSide = IconSide.START, isLoading: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

The filled button should only be used once per view (not including a modal dialog), these buttons have the most emphasis.

The minimal usage of the component is the text of the button but you can add an icon or indicate a loading state after a click action for example.

Parameters

onClick

Will be called when the user clicks the button

text

The text to be displayed in the button

modifier

Modifier to be applied to the button

size

The size of the button

intent

The intent color for the button.

enabled

Controls the enabled state of the button. When false, this button will not be clickable

icon

The optional icon to be displayed at the start or the end of the button container.

iconSide

If an icon is added, you can configure the side where is should be displayed, at the start or end of the button

isLoading

show or hide a CircularProgressIndicator at the start that push the content to indicate a loading state

interactionSource

the MutableInteractionSource representing the stream of Interactions for this button. You can create and pass in your own remembered instance to observe Interactions and customize the appearance / behavior of this button in different states.