Componentnavigation0.33 KB gzipZero dependencies

Sticky Footer

Sticky bottom bar that stays visible during scroll.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add sticky-footer

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { StickyFooter } from "@/components/ui/sticky-footer"; <StickyFooter />

Source code

sticky-footer.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxsticky-footer.tsx26 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface StickyFooterProps extends React.HTMLAttributes<HTMLDivElement> {  left?: React.ReactNode;  right?: React.ReactNode;} /** Sticky footer toolbar anchored during scroll. */export function StickyFooter({ left, right, className, children, ...props }: StickyFooterProps) {  return (    <div      className={cn(        "sticky bottom-0 z-30 flex items-center justify-between gap-4 border-t-2 border-dashed border-border bg-background/95 px-4 py-3",        className      )}      {...props}    >      <div className="animate-[sfUp2_0.3s_ease-out_both] motion-reduce:animate-none">{left ?? children}</div>      <div className="shrink-0 animate-[sfUp2_0.3s_ease-out_0.1s_both] motion-reduce:animate-none">{right}</div>    </div>  );} 

Props

PropTypeDescription
leftReact.ReactNodeConfigures left.
rightReact.ReactNodeConfigures right.