Actions
Delete Button
A destructive action button with deliberate confirmation feedback.
⠋
Install
npx shadcn@latest add https://4af.selfsimilar.dev/r/delete-button.jsonUsage
import { DeleteButton } from "@/components/ui/delete-button";
<DeleteButton onDelete={() => removeItem(id)}>Delete</DeleteButton>API
Main export: DeleteButton
A destructive button that asks for confirmation: the first press arms it and the second runs it. Escape, blur, and a timeout disarm it.
size uses the Button scale: xs is 24px, sm is 30px, md is 34px, and lg is 38px.