FloatingActionButtonDefaults

Contains the default values used by FloatingActionButton

Properties

Link copied to clipboard
@get:Composable
val containerColor: Color

Default container color for a floating action button.

Link copied to clipboard
@get:Composable
val extendedFabShape: Shape

Default shape for an extended floating action button.

Link copied to clipboard

The recommended size of the icon inside a LargeFloatingActionButton.

Link copied to clipboard
@get:Composable
val largeShape: Shape

Default shape for a large floating action button.

Link copied to clipboard
@get:Composable
val shape: Shape

Default shape for a floating action button.

Link copied to clipboard
@get:Composable
val smallShape: Shape

Default shape for a small floating action button.

Functions

Link copied to clipboard
fun bottomAppBarFabElevation(defaultElevation: Dp = 0.dp, pressedElevation: Dp = 0.dp, focusedElevation: Dp = 0.dp, hoveredElevation: Dp = 0.dp): FloatingActionButtonElevation

Use this to create a FloatingActionButton that represents the default elevation of a FloatingActionButton used for BottomAppBar in different states.

Link copied to clipboard
@Composable
fun elevation(defaultElevation: Dp = FabPrimaryTokens.ContainerElevation, pressedElevation: Dp = FabPrimaryTokens.PressedContainerElevation, focusedElevation: Dp = FabPrimaryTokens.FocusContainerElevation, hoveredElevation: Dp = FabPrimaryTokens.HoverContainerElevation): FloatingActionButtonElevation

Creates a FloatingActionButtonElevation that represents the elevation of a FloatingActionButton in different states. For use cases in which a less prominent FloatingActionButton is possible consider the loweredElevation.

Link copied to clipboard
@Composable
fun loweredElevation(defaultElevation: Dp = FabPrimaryTokens.LoweredContainerElevation, pressedElevation: Dp = FabPrimaryTokens.LoweredPressedContainerElevation, focusedElevation: Dp = FabPrimaryTokens.LoweredFocusContainerElevation, hoveredElevation: Dp = FabPrimaryTokens.LoweredHoverContainerElevation): FloatingActionButtonElevation

Use this to create a FloatingActionButton with a lowered elevation for less emphasis. Use elevation to get a normal FloatingActionButton.