Action list
Offer a short list of actions on one item from the bottom edge. Each action closes the drawer and a Cancel button remains for people who do not drag.
"use client"
import { CopyIcon, PencilIcon, Trash2Icon } from "lucide-react"
import { Button } from "@/components/ui/button"
import {
Drawer,
DrawerClose,
DrawerContent,
DrawerDescription,
DrawerFooter,
DrawerHeader,
DrawerTitle,
DrawerTrigger,
} from "@/components/ui/drawer"
export function DrawerActionList() {
return (
<div className="flex flex-wrap items-center gap-3">
<Drawer>
<DrawerTrigger asChild>
<Button intent="neutral" emphasis="stroke">
File actions
</Button>
</DrawerTrigger>
<DrawerContent>
<DrawerHeader>
<DrawerTitle>budget-2025.xlsx</DrawerTitle>
<DrawerDescription>Choose what to do with this file.</DrawerDescription>
</DrawerHeader>
<div className="flex flex-col gap-2">
<DrawerClose asChild>
<Button intent="neutral" emphasis="ghost" className="justify-start">
<PencilIcon />
Rename
</Button>
</DrawerClose>
<DrawerClose asChild>
<Button intent="neutral" emphasis="ghost" className="justify-start">
<CopyIcon />
Duplicate
</Button>
</DrawerClose>
<DrawerClose asChild>
<Button intent="error" emphasis="ghost" className="justify-start">
<Trash2Icon />
Move to trash
</Button>
</DrawerClose>
</div>
<DrawerFooter>
<DrawerClose asChild>
<Button intent="neutral" emphasis="stroke">
Cancel
</Button>
</DrawerClose>
</DrawerFooter>
</DrawerContent>
</Drawer>
</div>
)
}