Dock Expandable FAB
A floating action button that turns its plus into a cross and fires a speed-dial of labelled actions upward with staggered springs.
fabspeed-dialfloatingactionsstagger
Installation
Run the shadcn CLI in a project with Tailwind CSS. The component lands in components/pixelpapa/dock-expandable-fab.tsx.
$pnpm dlx shadcn@latest add "https://pixelpapa.com/r/dock-expandable-fab.json"Manual install+
1. Install the dependencies.
$pnpm add lucide-react motion2. Copy the code from the Code tab above into your project. It imports the cn helper from @/lib/utils, which every shadcn project already has.
Build it with AI
Prefer to let an agent do the wiring? Copy this prompt, describe where the component should go, and paste.
AI prompt
Paste into Claude, Cursor, v0 or Lovable
Add the "Dock Expandable FAB" component from PixelPapa UI to this project. What it is: A floating action button that turns its plus into a cross and fires a speed-dial of labelled actions upward with staggered springs. Category: Docks & Menus. Depends on: lucide-react, motion. 1. Install it with the shadcn CLI: npx shadcn@latest add "https://pixelpapa.com/r/dock-expandable-fab.json" (If the CLI is unavailable, fetch that URL, write files[0].content to components/pixelpapa/dock-expandable-fab.tsx and install the listed dependencies.) 2. Import it from "@/components/pixelpapa/dock-expandable-fab" and place it where I describe below. 3. Keep its animation timings and accessibility attributes. Replace the demo copy and data with content that fits my product, and use my existing theme tokens (bg-background, text-foreground, bg-primary, border-border) rather than hard-coded colours. Where to use it: <describe the page and position here>
More docks & menus
- Dock Bottom Nav MobileA mobile tab bar where a blob slides under the active tab, squashing as it travels, while the icon hops up into it and its label fades in below.
- Dock Floating ToolbarA text-format toolbar that pops over a selection: toggles spring into their active state and the whole bar morphs into a link field and back.
- Dock MagnifyA dock whose icons swell by their distance to the cursor, lift their labels, bounce on launch and respond to keyboard focus the same way.
- Menu Bar AppA desktop-style File / Edit / View menubar: click once, then glide between menus as the highlight follows, with check items, shortcuts and full arrow-key navigation.
- Menu Context Right ClickA custom context menu that opens at the pointer, flips to stay inside its area, scales from the corner nearest the click and is fully keyboard driven.
- Menu Dropdown NestedA dropdown with submenus to any depth: they open on hover intent or ArrowRight, scale out from their parent row and close level by level with ArrowLeft and Escape.