Skip to content
Sign upGet access
MicrointeractionsDrop refuseMenu

Drop refuse (Pro)

ProIncluded in $99

Saying no to a file without a dialog: it shakes its head and is tossed back out, with the reason.

ProA file the composer can't read lands where you dropped it, shakes its head once and is tossed back over the edge, while one line says why and what would work instead.

Drop something the composer can't read and the file lands as a card where you let go, shakes its head once, and is tossed back out over the edge, while the composer says why in one line and what would work instead. Files that pass drop in as chips. No modal, no lost text, and the reason is right where you were looking.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/drop-refuse

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { DropRefuse } from "@/components/ui/chatcn/pro/drop-refuse"

<DropRefuse accept={[".png", ".jpg", ".pdf"]} maxSize={20_000_000} attached={files} onFiles={add} />

Props

PropTypeNotes
acceptstring[]Extensions; empty takes anything
maxSizenumberBytes
onFiles(files: File[]) => voidFiles that passed
attached{ name, size }[]Shown as chips

Accessibility

  • The reason is a polite live region and stays readable for a few seconds; the tossed card is decorative.

Motion

  • One 1.25 s keyframe run: land, shake, toss with a turn. Reduced motion: only the reason shows.