Skip to content
Sign upGet access
MicrointeractionsPin dropMenu

Pin drop

A pin that goes in like a pin: it falls in point first and lands with a squash, and is plucked out to unpin.

Pin a chat and the pin falls in point first and lands with a squash as the chat glides to the top; unpin and it is plucked out.

Pin a chat and the pin falls in point first, tilted, lands with a small squash as it goes into the board and fills in. Unpin and it is plucked out, lifting and turning away. While unpinned it waits as a faint outline that only shows on hover or focus.

Installation

$ pnpm dlx shadcn@latest add https://chatcn.dev/r/pin-drop.json

Usage

tsx
import { PinDrop } from "@/components/ui/chatcn/pin-drop"

<PinDrop label="Fix session expiry" pinned={pinned} onPinnedChange={setPinned} />

Props

PropTypeNotes
pinned / onPinnedChangeboolean
labelstringFor the accessible name: Pin Fix session expiry

Accessibility

  • A toggle button with aria-pressed, named Pin or Unpin and the label.

Motion

  • Keyframed fall and squash, and a lift and turn out. Reduced motion: it fills or empties.