Kwik Extended Floating Action Button
fun KwikExtendedFloatingActionButton(modifier: Modifier = Modifier, text: @Composable () -> Unit, contentColor: Color = MaterialTheme.colorScheme.onPrimary, containerColor: Color = MaterialTheme.colorScheme.primary, shape: Shape = FloatingActionButtonDefaults.extendedFabShape, elevation: FloatingActionButtonElevation = FloatingActionButtonDefaults.elevation(), interactionSource: MutableInteractionSource? = null, icon: @Composable () -> Unit = {}, loading: Boolean = false, loadingText: String? = null, expanded: Boolean = true, enabled: Boolean = true, onClick: () -> Unit)
An extended floating action button that can be customized to suit different use cases.
Parameters
modifier
Modifier to be applied to the button.
text
The text to be displayed on the button.
container Color
The color of the button.
icon
The icon to be displayed on the button.
content Color
The color of the icon.
shape
The shape of the button.
expanded
Whether the button is expanded.
elevation
The elevation of the button.
interaction Source
The interaction source of the button.
on Click
The action to be performed when the button is clicked.
Example usage:
KwikExtendedFloatingActionButton(
text = { Text(text = "Action", style = MaterialTheme.typography.titleSmall) },
icon = { Icon(Icons.Sharp.Share, tint = Color.White, contentDescription = "share") },
containerColor = MaterialTheme.colorScheme.primary,
onClick = { /* Do something */}
)
Content copied to clipboard