Skip to content
synccn

Speed Dial

New

Floating action button that fans out more actions.

Installation

$ pnpm dlx shadcn@latest add @synccn/speed-dial

First time in this project? Connect synccn with one command.

Usage

import { SpeedDial } from "@/components/ui/nav-extras";<SpeedDial actions={actions} />

API reference

Generated from the component's TypeScript types, so it always matches the code.

SpeedDial

Floating action button that fans out secondary actions. actions: [{ label, icon, onClick }]

  • actionsrequired
    { label: string; icon: React.ElementType; onClick?: () => void }[]

    Secondary actions, top to bottom.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

  • lib/utilscn (merges class names)
  • lib/hooksuseClickOutside (closes on an outside click), useEscape (closes on Escape)

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA attributes: aria-current, aria-expanded, aria-hidden, aria-label
  • Closes with Escape
  • Closes when you click or tap outside