Skip to content

    Browse components

    Strip Delete

    Delete a document card and it feeds into a rattling shredder, coming out as strips that scatter and fall, with an undo that drops it back in.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/strip-delete

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/strip-delete.json

    Usage

    import { StripDelete } from "@/components/ui/strip-delete";
    
    <StripDelete
      title={file.name}
      onDelete={() => hide(file.id)}
      onUndo={() => show(file.id)}
      onExpire={() => deleteForever(file.id)}
    />

    Props

    PropTypeDefaultDescription
    titlestring"Q3-forecast.pdf"Document name.
    subtitlestring"2.4 MB · edited 3h ago"Line under the title.
    stripsnumber12Number of strips.
    undoTimeoutnumber5000Ms undo stays available; 0 keeps it forever.
    childrenReactNode—Custom card body.
    onDeleteReactNode—Called when the card is shredded.
    onUndoReactNode—Called when undo restores it.
    onExpireReactNode—Called when the undo window closes: delete for real here.
    classNamestring—Extra classes for the root element.