Skip to content
caliper ui pro docs

Scroll aware fab

The main action kept in reach: it shows its label at the top and when scrolling up, and shrinks to its icon while you scroll down.

Pro

Messages

  • Amara OkaforCan you approve INV-2041 today?
  • Tomás FerreiraNotes from the Ostra call are in the doc.
  • Priya RamanBank feed is back, 12 payments matched.
  • Kiara MurayamaWelcome Noor to the team on Monday?
  • Rafael AbreuSeptember is closed. Thanks all!
  • Amara OkaforLedger export is in the shared folder.
  • Tomás FerreiraI changed the travel rule to €400.
  • Priya RamanCan you approve INV-2041 today?
  • Kiara MurayamaNotes from the Ostra call are in the doc.
  • Rafael AbreuBank feed is back, 12 payments matched.
  • Amara OkaforWelcome Noor to the team on Monday?
  • Tomás FerreiraSeptember is closed. Thanks all!
  • Priya RamanLedger export is in the shared folder.
  • Kiara MurayamaI changed the travel rule to €400.
  • Rafael AbreuCan you approve INV-2041 today?
  • Amara OkaforNotes from the Ostra call are in the doc.
  • Tomás FerreiraBank feed is back, 12 payments matched.
  • Priya RamanWelcome Noor to the team on Monday?
  • Kiara MurayamaSeptember is closed. Thanks all!
  • Rafael AbreuLedger export is in the shared folder.
  • Amara OkaforI changed the travel rule to €400.
  • Tomás FerreiraCan you approve INV-2041 today?
  • Priya RamanNotes from the Ostra call are in the doc.
  • Kiara MurayamaBank feed is back, 12 payments matched.

When to use

  • Phone screens with one primary action, like compose.
  • Long lists where the action should not cover content.

When not to use

  • Desktop layouts; put the action in the header.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/scroll-aware-fab

Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

ScrollAwareFab

4 props

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
icon *ReactNode—
label *string—What it does, e.g. "New message". Always its accessible name.
scrollRootRefObject<HTMLElement | null>—The element that scrolls, if not the window.
position"fixed" | "absolute""fixed""absolute" places it in its nearest positioned parent, e.g. a phone frame.

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It is built on native elements and keeps aria-label and aria-hidden in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/scroll-aware-fab.md

The index of every part is at /llms.txt.

More in Surfaces