suiss/uim · React Native Component

Bottom Bar

A bar pinned to the bottom of a screen for primary actions, which rises above the keyboard.

Bottom Bar is an open-source mobile component from suiss/uim for React Native and Expo, with SwiftUI and Jetpack Compose versions built from the same design tokens. The @esuiss/uim CLI copies its source into your project, so you own the code.

iOS
Bottom Bar on iOS in light mode

BottomBar is an animated View that adds bottom padding equal to the safe-area inset, or to the keyboard height while the keyboard is open, and animates between them with the keyboard's own timing. BottomBarContent adds the standard padding and spacing for the buttons inside.

Use it for the main call to action of a screen, such as checkout or a form submit button.

Installation

$ pnpm dlx @esuiss/uim@latest add bottom-bar

The CLI also adds what it builds on: Screen.

Manual

  1. Install the dependencies:
npx expo install cn react-native-reanimated react-native-safe-area-context react-native-worklets
  1. Add the pieces it builds on: Screen, and the primitives components/primitives/keyboard.tsx.

  2. Copy the source into components/ui/bottom-bar.tsx:

uniwind/components/ui/bottom-bar.tsx
import { cn } from "cn"
import * as React from "react"
import { View, type ViewProps } from "react-native"
import {
  Easing,
  ReduceMotion,
  useAnimatedStyle,
  useSharedValue,
  withTiming,
} from "react-native-reanimated"
import { useSafeAreaInsets } from "react-native-safe-area-context"
import { useKeyboard } from "@/components/primitives/keyboard"
import { AnimatedView } from "@/components/ui/animated-view"
import { ScreenContext } from "@/components/ui/screen"

const EASING = Easing.bezier(0.17, 0.59, 0.4, 0.77)
  1. Update the import paths to match your project.

Usage

import { BottomBar, BottomBarContent } from "@/components/ui/bottom-bar"
<Page>
  <BottomBar>
    <BottomBarContent>
      <Button size="lg" block>
        <Text>Continue</Text>
      </Button>
    </BottomBarContent>
  </BottomBar>
</Page>

Place BottomBar as the last child of the screen so it sits below the scrolling content. Stack buttons in BottomBarContent, or add flex-row to place them side by side.

Set separator to draw a hairline above the bar. Inside a Screen that already handles the bottom safe-area edge, the inset is not added twice.

Examples

With separator

A hairline above the bar with separator.

iOS
Bottom Bar (with separator) on iOS in light mode

Two actions

A primary and a plain button stacked.

iOS
Bottom Bar (two actions) on iOS in light mode

Side by side

Back and Next buttons in a row.

iOS
Bottom Bar (side by side) on iOS in light mode

Above keyboard

The bar moving up with the keyboard while an input is focused.

iOS
Bottom Bar (above keyboard) on iOS in light mode

API Reference

BottomBar

Bottom container that follows the safe area and keyboard.

ExtendsViewProps
PropType
About
Draws a top border. Defaults to false.
Type
boolean
Default
false

BottomBarContent

Padded area for the actions.

ExtendsViewProps

Accessibility

  • The bar adds no role; each action inside provides its own.

Notes

  • The padding animation respects the system Reduce Motion setting.
  • Uses bg-surface and border-separator tokens; light and dark follow the system appearance.