23rd logo23rd

Stretchy Footer

Rubber-band overscroll that stretches a rainbow aurora up from the page bottom.

Preview

Installation

pnpm dlx shadcn@latest add @23rd/stretchy-footer

Or from the public GitHub registry:

pnpm dlx shadcn@latest add radiumcoders/23rd.dev/stretchy-footer

Usage

Use it as the scroll viewport, with your page and footer as children.

"use client"

import { StretchyFooter } from "@/components/ui/stretchy-footer"

export function Page() {
  return (
    <StretchyFooter className="h-svh bg-background">
      <main className="min-h-[120%] px-8 py-24 text-foreground">
        {/* …page content… */}
      </main>
      <footer className="px-8 pb-10 text-center text-muted-foreground">
        23rd · opinionated UI for shippers
      </footer>
    </StretchyFooter>
  )
}

For window scroll, pass windowScroll and mark the page root with data-stretchy-page:

"use client"

import { StretchyFooter } from "@/components/ui/stretchy-footer"

export function DocsChrome() {
  return (
    <>
      <div data-stretchy-page>{/* page content */}</div>
      <StretchyFooter windowScroll />
    </>
  )
}

Props

PropTypeDefault
childrenReactNode / snippetnone
scrollRefRefObject<HTMLElement | null>React: self as scroller
scrollElHTMLElementSvelte: self as scroller
windowScrollbooleanfalse
contentSelectorstring[data-stretchy-page]
maxStretchnumber280
colorsstring[]magenta → navy
stiffnessnumber380
dampingnumber32
columnsnumber9
blurnumber16, px
glownumber0, floor bloom, 0–1
flipbooleanfalse, valley shape
rotate0 | 1800, 180 hangs it from the page
labelstringStretchy overflow
demoIdstringpairs with playStretchyFooterDemo({ target })
classNamestringReact only
classstringSvelte only