# With action menu

> Three-dot icon button in the header corner opens a dropdown with rename, share, and delete options.

A shadcn/ui block from the [@flx](https://ui.flexnative.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/flx/card-04).

- Page, with a live preview: https://shadcn.exchange/r/flx/card-04
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/flx/card-04-light-6233d9e71ca336e3.png
- Registry item: https://ui.flexnative.com/r/card-04.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/card-04.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `card`, `button`, `dropdown-menu`

## Files

### `registry/patterns/card/card-04.tsx`

```tsx
import {
  MoreHorizontalIcon,
  PencilIcon,
  Share2Icon,
  TrashIcon,
} from 'lucide-react'

import { Button } from '@/components/ui/button'
import {
  Card,
  CardAction,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from '@/components/ui/card'
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuGroup,
  DropdownMenuItem,
  DropdownMenuSeparator,
  DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu'

export function Card04() {
  return (
    <Card className="w-full max-w-sm">
      <CardHeader>
        <CardTitle>Quarterly report</CardTitle>
        <CardDescription>Finance · Q2 2026</CardDescription>
        <CardAction>
          <DropdownMenu>
            <DropdownMenuTrigger
              render={
                <Button variant="ghost" size="icon-sm">
                  <MoreHorizontalIcon />
                  <span className="sr-only">Open menu</span>
                </Button>
              }
            />
            <DropdownMenuContent align="end">
              <DropdownMenuGroup>
                <DropdownMenuItem>
                  <PencilIcon />
                  Rename
                </DropdownMenuItem>
                <DropdownMenuItem>
                  <Share2Icon />
                  Share
                </DropdownMenuItem>
              </DropdownMenuGroup>
              <DropdownMenuSeparator />
              <DropdownMenuItem variant="destructive">
                <TrashIcon />
                Delete
              </DropdownMenuItem>
            </DropdownMenuContent>
          </DropdownMenu>
        </CardAction>
      </CardHeader>
      <CardContent className="text-muted-foreground">
        Revenue grew 18% over the prior quarter, driven by expansion in the
        enterprise segment.
      </CardContent>
    </Card>
  )
}
```
