OudsFloatingActionButton

fun OudsFloatingActionButton(icon: OudsFloatingActionButtonIcon, onClick: () -> Unit, modifier: Modifier = Modifier, shape: Shape = OudsFloatingActionButtonDefaults.shape, appearance: OudsFloatingActionButtonAppearance = OudsFloatingActionButtonDefaults.Appearance, interactionSource: MutableInteractionSource? = null)

The FAB represents the most important action on a screen. It puts key actions within reach.

FAB typically contains an icon, for a FAB with text and an icon, see OudsExtendedFloatingActionButton.

Parameters

icon

Icon for this FAB.

onClick

Called when this FAB is clicked.

modifier

The Modifier to be applied to this FAB.

shape

Defines the shape of this FAB's container and shadow.

appearance

Appearance of the FAB among OudsFloatingActionButtonAppearance values.

interactionSource

An optional hoisted MutableInteractionSource for observing and emitting Interactions for this FAB. You can use this to change the FAB's appearance or preview the FAB in different states. Note that if null is provided, interactions will still happen internally.

Samples

OudsFloatingActionButton(
    icon = OudsFloatingActionButtonIcon(
        imageVector = Icons.Filled.FavoriteBorder,
        contentDescription = "Content description"
    ),
    onClick = { /* Do something! */ }
)