Veil UI
Components

Mobile Bottom Bar

A sticky bottom action bar that respects the safe area.

Installation

$ npx veil-ui@latest add mobile-bottom-bar

Usage

import { MobileBottomBar } from "@/components/ui/mobile-bottom-bar";

<MobileBottomBar>
  <Button variant="outline" className="flex-1">Cancel</Button>
  <Button className="flex-1">Save changes</Button>
</MobileBottomBar>;

Examples

Basic

Checkout

Order summary

Subtotal $129 · Shipping calculated at checkout

Total

$129.00

API reference

The package exports mobile-bottom-bar along with its composable parts. It forwards standard attributes to its root element; see the examples above for the component-specific props.

Accessibility

  • Touch targets are large enough to tap comfortably and keep visible focus rings for keyboard and switch users.
  • Gesture interactions (swipe, pull to refresh) have visible button alternatives so they are not the only way to act.
  • Sheets, drawers and dialogs follow the underlying accessible primitives for focus trapping and escape handling.

Vue and plain HTML

This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add mobile-bottom-bar --framework vue or switch the framework in components.json.

<script setup lang="ts">
import { cn } from "@/lib/utils";

import type { MobileBottomBarProps } from "./types";

defineOptions({ inheritAttrs: false });

const props = withDefaults(defineProps<MobileBottomBarProps>(), {
  sticky: true,
});
</script>

<template>
  <div
    data-slot="mobile-bottom-bar"
    v-bind="$attrs"
    :class="
      cn(
        'z-30 flex items-center gap-2 border-t bg-background/95 px-4 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-3 backdrop-blur',
        sticky && 'sticky bottom-0',
        props.class,
      )
    "
  >
    <slot />
  </div>
</template>

On this page