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
@get:Composable
val largeExtendedFabShape: Shape

Default shape for a large 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 mediumExtendedFabShape: Shape

Default shape for a medium extended floating action button.

Link copied to clipboard

The recommended size of the icon inside a MediumFloatingActionButton.

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

Default shape for a medium 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 smallExtendedFabShape: Shape

Default shape for a small extended 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 = FabPrimaryContainerTokens.ContainerElevation, pressedElevation: Dp = FabPrimaryContainerTokens.PressedContainerElevation, focusedElevation: Dp = FabPrimaryContainerTokens.FocusedContainerElevation, hoveredElevation: Dp = FabPrimaryContainerTokens.HoveredContainerElevation): 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 = ElevationTokens.Level1, pressedElevation: Dp = ElevationTokens.Level1, focusedElevation: Dp = ElevationTokens.Level1, hoveredElevation: Dp = ElevationTokens.Level2): FloatingActionButtonElevation

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