---
title: File Actions
description: A per-file actions menu — download, copy, rename, move and delete — driven by useFiles.
---

A `⋯` menu that routes every action through the `useFiles()` instance you pass in: [`download()`](/api/download), [`copy()`](/api/copy), [`move()`](/api/move) (rename is just a move that keeps the parent prefix) and [`delete()`](/api/delete). Copy, rename and move open a small prompt for the destination key; delete confirms first.

<ComponentPreview name="file-actions/file-actions-basic" />

## Installation

<ComponentInstall name="file-actions" />

## Usage

```tsx lineNumbers
import { useFiles } from "files-sdk/react";

import { FileActions } from "@/components/files-sdk/file-actions";

export function Row({ fileKey }: { fileKey: string }) {
  const files = useFiles({ endpoint: "/api/files" });

  return <FileActions files={files} fileKey={fileKey} onChanged={() => {}} />;
}
```

Drop it into a [File Browser](/ui/components/file-browser) or [File List](/ui/components/file-list) row. `onChanged` fires after a successful copy/rename/move/delete so the parent can re-list. Rename edits only the basename and re-attaches the original prefix; Move takes a full destination key.

## Props

<AutoTypeTable
  path="registry/files-sdk/file-actions/file-actions.tsx"
  name="FileActionsProps"
/>
