Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
ActionsAndroid

Floating action button

Present a prominent Material-native action using Lumen semantic intent.

Public APILumenFloatingActionButtonAndroid / Compose

Native example

Use Floating action button

Use for one prominent Material screen action. Keep navigation bars and scaffold placement in application code.

Floating action button rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenFloatingActionButton(
    imageVector = Icons.Default.Add,
    contentDescription = "Create project",
    onClick = ::createProject,
    scrollState = navigationScrollState,
    navigationBehavior = LumenFloatingActionButtonNavigationBehavior.HideWithNavigation
)

Reference

Public API

The primary shared and platform-specific options exposed by LumenFloatingActionButton.

APIValues or typeDefaultDescription
imageVectorImageVectorRequiredRenders the native action glyph.
contentDescriptionStringRequiredNames the icon-only action.
onClick() -> UnitRequiredRuns the primary screen action.
intentbrand · accent · dangerbrandSelects a semantic action palette.
sizeregular · smallregularSelects Material-native FAB geometry.
navigationBehavioralwaysVisible · hideWithNavigation · followNavigationalwaysVisibleKeeps, hides, or repositions the action as scroll-responsive navigation changes.
scrollStateLumenNavigationBarScrollState?nullSupplies the navigation visibility used by coordinated behavior.

Native behavior

Design and accessibility

When to use it

Use for one prominent Material screen action. Keep navigation bars and scaffold placement in application code.

Accessibility

The required content description names the icon-only action while the control preserves native Material button semantics.

Android docsCompose module