A list whose rows drag left over a Later and Done tray, damped past it; a long swipe marks done in one move with Done arming in signal, resolved rows say what happened and collapse, and every action has a key.
pnpm dlx shadcn@latest add @beautiful-ui-pro/swipe-actionsNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { SwipeActions, type SwipeItem } from "@/components/ui/notchset/swipe-actions";
export function AlertInbox() {
const [mail, setMail] = React.useState<SwipeItem[]>([
{ id: "1", from: "Relay alerts", initials: "RA", time: "09:12", subject: "Planner p95 over 400ms", snippet: "3 spikes in the last hour", unread: true },
{ id: "2", from: "Maya Kerr", initials: "MK", time: "08:40", subject: "Canary at 5%", snippet: "Looks healthy so far" },
]);
return <SwipeActions items={mail} label="INBOX" caption="ops@relay.dev" onAction={(_id, item) => setMail((m) => m.filter((x) => x.id !== item.id))} />;
}items–
{ id, from, initials, org?, time?, subject, snippet?, unread? }[]The rows.
actions–
{ id, label, key?, icon?, tone?, resolved? }[]The tray. Defaults to the designed Later (L) and Done (D).
onAction–
(actionId, item) => voidCalled when a row resolves.
fullSwipe / threshold / trayWidth–
string / number / numberThe long-swipe action (done), the release distance that keeps the tray open (60) and its width (168).
label / caption / counter–
ReactNode / ReactNode / (unread, open) => ReactNodeThe header.
components/ui/notchset/swipe-actions.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.