Floating Action Button

A round primary button fixed to the bottom right corner of the viewport for the main action on a screen. Accepts every Button prop, including icons.

src/registry/ui/floating-action-button.tsx/r/floating-action-button.json

Installation#

bash
npx shadcn@latest add @minidev/floating-action-button

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/floating-action-button.json

Usage#

tsx
import { FloatingActionButton } from "@/components/ui/floating-action-button"

export function Example() {
  return <FloatingActionButton />
}

API reference#

Also accepts every prop of Button props, passed through to the root element.

Dependencies#

npm

React only

Built from

All button components