---
title: "Overflow Actions | Free React & Tailwind Blocks Component | Motion UI"
canonical: "https://blacknest.dev/motion/c/blocks/overflow-actions"
github_source: "https://github.com/Rkj0123/motion-ui-skill/blob/main/components/motion/overflow-actions.tsx"
install_command: "npx motion-ui-skill add overflow-actions"
dependencies: ["clsx","lucide-react","motion","react","tailwind-merge"]
category: "blocks"
subcategory: "motion"
---

# Overflow Actions

> Connected pill rail for primary actions that springs open to reveal extra controls.

## Install

```bash
npx motion-ui-skill add overflow-actions
```

## Dependencies

- `clsx`
- `lucide-react`
- `motion`
- `react`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { CalendarClock, Eye, GitBranch, Pin } from "lucide-react";
import { useState } from "react";
import {
  type OverflowActionItem,
  OverflowActions,
} from "@/components/motion/overflow-actions";

const primaryActions: OverflowActionItem[] = [
  {
    id: "preview",
    label: "Preview",
    icon: <Eye className="h-4 w-4" />,
  },
  {
    id: "pin",
    label: "Pin",
    icon: <Pin className="h-4 w-4" />,
  },
];

const overflowActions: OverflowActionItem[] = [
  {
    id: "branch",
    label: "Branch",
    icon: <GitBranch className="h-4 w-4" />,
  },
  {
    id: "schedule",
    label: "Schedule",
    icon: <CalendarClock className="h-4 w-4" />,
  },
];

export function OverflowActionsPreview() {
  const [expanded, setExpanded] = useState(false);

  return (
    <div className="flex w-full items-center justify-center">
      <OverflowActions
        primaryActions={primaryActions}
        overflowActions={overflowActions}
        expanded={expanded}
        onExpandedChange={setExpanded}
        openLabel="Open action rail"
        closeLabel="Collapse action rail"
      />
    </div>
  );
}
```

## API Reference

### OverflowActions

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `primaryActions` | `OverflowActionItem[]` | — | Yes | — |
| `overflowActions` | `OverflowActionItem[]` | — | Yes | — |
| `expanded` | `boolean` | — | No | — |
| `defaultExpanded` | `boolean` | `false` | No | — |
| `onExpandedChange` | `((expanded: boolean) => void)` | — | No | — |
| `onAction` | `((item: OverflowActionItem) => void)` | — | No | — |
| `collapseOnAction` | `boolean` | `false` | No | — |
| `size` | `"sm" \| "md"` | `md` | No | — |
| `openLabel` | `string` | `Show extra actions` | No | — |
| `closeLabel` | `string` | `Hide extra actions` | No | — |
| `className` | `string` | — | No | — |
| `classNames` | `OverflowActionsClassNames` | — | No | — |

## Source Files

- [components/motion/overflow-actions.tsx](https://github.com/Rkj0123/motion-ui-skill/blob/main/components/motion/overflow-actions.tsx)
- [lib/ease.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/ease.ts)
- [lib/hooks/use-hover-capable.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/hooks/use-hover-capable.ts)
- [lib/utils.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/utils.ts)
