Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Buttons & Actions

Delete Button

Buttons & Actions

Delete Button React component for Tailwind CSS v4

Copy ButtonTheme Toggle
Live props
Appearance
size
radius
surface
recess
iconColor
accent
Content
label
confirmLabel
cancelLabel
deletedLabel
keptLabel
Behavior
resetDelay1400ms
State
disabled
Code
import { DeleteButton } from "@/components/ui/delete-button"

<DeleteButton />
  1. Home
  2. Components
  3. Buttons & Actions
  4. Delete Button
Free

Delete Button React component for Tailwind CSS v4

v1.0.1·Updated in 1.2.1

A React delete button with inline confirmation: the bin opens a small confirm and cancel panel in place, no dialog needed.

Click the bin to lift its lid open. A panel slides out with a check to confirm and a cross to back out. Escape, or the bin again, backs out too. Confirming draws a check where the bin was and swaps back to the bin after a moment; backing out settles the bin in place.

Delete Button is a free React component in the React button components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add delete-button, together with UIProvider and the npm package motion.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add delete-button

Usage

Import DeleteButton from @/components/ui/delete-button.

"use client"

import { DeleteButton } from "@/components/ui/delete-button"

export function Demo({ onDelete }: { onDelete: () => void }) {
  return <DeleteButton label="Delete invoice" onConfirm={onDelete} />
}

Props

  • sizedefault "md"
    "sm" | "md" | "lg"

    Scale of the tile, the confirm panel and the icons. The tile is 40px (sm), 48px (md) or 56px (lg) square; on touch screens the sm tile and the confirm and cancel circles get a 44px tall hit area.

  • radiusdefault "md"
    "none" | "sm" | "md" | "lg" | "full"

    Corner radius of the tile and the confirm panel: square, 6px tighter, the original 14 / 16 / 18px per size, 6px rounder, or a pill.

  • surfacedefault ""
    string

    Any CSS color for the tile and the two circles. Empty uses the soft gray (#F4F4F9 light, #262626 dark); hover lightens it.

  • recessdefault ""
    string

    Any CSS color for the confirm panel behind the circles. Empty uses #E7E7EF light, #1B1B1B dark.

  • iconColordefault ""
    string

    Any CSS color for the bin, the cross and the focus ring. Empty uses #868593 light, #9B9AA7 dark.

  • accentdefault "#FF5F2E"
    string

    Any CSS color for the confirm check and the check drawn after deleting.

  • labeldefault "Delete"
    string

    Accessible name of the bin button. Name the thing, e.g. "Delete invoice", when several sit on one screen.

  • confirmLabeldefault "Confirm delete"
    string

    Accessible name of the check button in the panel.

  • cancelLabeldefault "Cancel"
    string

    Accessible name of the cross button in the panel.

  • deletedLabeldefault "Deleted"
    string

    Announced to screen readers after confirming.

  • keptLabeldefault "Kept"
    string

    Announced to screen readers after backing out.

  • resetDelaydefault 1400
    number

    How long the check stays after confirming, in milliseconds, before the bin comes back.

  • disableddefault false
    boolean

    Blocks the button and dims it. Disabling it while the panel is open backs out of the panel.

  • onConfirm
    () => void

    Called when the check is pressed.

  • onCancel
    () => void

    Called when the panel closes without deleting, from the cross, the bin, or Escape.

  • className
    string

    Extra classes merged onto the root element; other div props are spread onto it too. The root carries data-state (open or closed) and data-status (idle, deleted or kept) for styling.

Examples

Remove team members

One small button per row with a label that names the person; confirming removes the row after the check shows.

Sizes

sm, md and lg. The panel and icons scale with the button.

Cart line item

radius full and a deeper red accent, next to the product photo and price.

Dependencies

motionui-config

Files

  • components/ui/delete-button.tsx

FAQ

Is the React Delete Button component free?

Yes. The source is free and needs no account: copy it from the Code tab or install it with the CLI.

How do I install Delete Button?

Run npx wingo-ui@latest add delete-button. It also adds the Wingo UI item it builds on (UIProvider) and the npm package motion. With shadcn, run npx shadcn@latest add https://wingo-ui.com/r/delete-button.json.

See also

ButtonAlert DialogSlide To ConfirmToastHaptic Button

More React button components

ToggleButton GroupCopy ButtonTheme ToggleToggle Group
All 7 React button components

Articles using this component

  • React Slide to Confirm: When It Beats a Confirm Dialog

    Mobile UI in React · Oct 13, 2026 · 8 min read

  • React Swipe to Delete: iOS Swipe Actions With Undo

    Mobile UI in React · Oct 13, 2026 · 9 min read

PreviousCopy ButtonNext Theme Toggle
Quarterly report.pdf2.4 MB

Click the bin, then confirm or back out.