Bottom Actions

The main action at the bottom of a phone screen, with an optional second action under it.

import { BottomActions } from "@plexui/react-native"

Examples

Overview

Platforms

iOS 26Android
Native componentNone: the bottom action of iOS 26's setup screensNone: the Plex Android look's bottom button
LookA 52pt capsule 36pt from the sides, just over the home indicatorA full-width 48dp button 16dp from the sides, 16dp above the gesture bar

API

BottomActions

PropTypeDefaultDescription
childrenReactNode—The screen's main action, a Button, and an optional second Button under it (Not now: iOS's glass capsule, Android's ghost button, unless it sets its own variant). Each Button is a block of the size 3xl unless it sets its own (required)
floatingbooleanfalsePuts the actions over the content (a scroll view under them), on a soft edge; off, they take their room at the end of the screen
background"soft" | "hard" | "fade" | "none""soft"The edge under floating actions, an iOS 27.2 bottom bar's: `soft`, the lowest 118pt of the screen veiled (to 46%, 56% in dark) and blurred the more the lower; `hard`, from the actions' top the content blurred under the screen's color at 53% (60% in dark) with a hairline on top; `fade`, TabBar's fade from the top action's top (60pt to 85%, no blur); `none`, nothing under them. Android draws its soft edge for all but `none`
canvasColorstring—The color of the floating edge's veil: the screen's (a grouped screen's gray). Defaults to the theme's background
hiddenbooleanfalseFloating actions away: down by their height and faded, taking no presses (useHideOnScroll sets it from the scroll view)
secondarybooleanfalseNo main action: a lone Button takes the second action's look (iOS 26's glass capsule, Android's ghost button), as a step whose rows move on by themselves keeps only "Skip"
testIDstring—Test id
styleStyleProp<ViewStyle>—Style of the bar

useBottomActionsMetrics

useBottomActionsMetrics({ count }) returns where BottomActions stands its actions, without drawing them: { side, height, gap, paddingTop, bottom, top, edge }. side is the room from the screen's sides (36 on iOS, 16 on Android), an edge a screen's own words line up on; height an action's (52 on iOS, 48 on Android); gap between two actions and paddingTop over the first (8 each); bottom from the screen's bottom edge to the last action (iOS 2 over the safe area, 16 with none; Android 16 over it); top the whole box from the screen's bottom for count actions (1 by default).

edge describes the soft edge that floating actions stand on, as BottomActions draws it by default. It has two values: top, the distance from the screen's bottom to where the edge starts, and fade, the distance over which the screen's color eases in from there. Below that the edge holds solid to the bottom.

  • On iOS it is iOS 27.2's veil: top 118 and fade 114, since the veil is whole 4 over the screen's edge. These values are the same for any count.
  • On Android the edge starts 13 over the first action's top and eases in over 60. With one action that is top 77 and fade 60.

An app that draws an edge of its own under the actions, for example a solid one, can start it and ease it in the same way.

import { useBottomActionsMetrics } from "@plexui/react-native"

const { side } = useBottomActionsMetrics()
<Text style={{ marginHorizontal: side }}>By continuing you agree to the terms.</Text>

The iOS side is the token --bottom-actions-side, 36 at every width. An app that wants its actions on its words' line at every width sets it in its brand. The page gutter plus a List row's inset is 36 on a phone under 414pt and 40 from 414pt:

<ThemeProvider brand={{ tokens: { "--bottom-actions-side": "calc(var(--page-gutter) + var(--list-row-inset))" } }}>

The Android side stands on the page's gutter: --page-gutter-android, 16, Material's compact margin. An app that changes the gutter moves the actions with it, and --bottom-actions-side-android sets the side on its own.

useHideOnScroll

PropTypeDefaultDescription
thresholdnumber24How far down the content scrolls before the actions go
atEnd"show" | "hide""show"Near the end: show brings them back, as Safari's bar; hide keeps them away, for a page whose own actions stand at its end
endDistancenumber24How near the end counts as the end
returns{ hidden, onScroll, scrollEventThrottle }—hidden for BottomActions; onScroll and scrollEventThrottle for the scroll view