Reported as abusive · 5
[Message hidden while it is reviewed — contains a personal attack on another member.]
SIG—14 Signature system
Decisions at the speed of a gesture: fling the top card toward a decision, or use arrows and buttons — with tallies and an undo that flies the card back.
Fling the top card toward a decision, or use the arrow keys or buttons. Backspace undoes — the card flies back from where it went. Illustrative content.
01 / 05
Reported as spam · 3
Selling 40% off accounts for your favourite design tools, message me for the link!!
Left arrow: Remove. Right arrow: Keep. Up arrow: Escalate. Backspace undoes.
import { TriageDeck } from "mizu-ui";
export function Example() {
return (
<TriageDeck
label="Inbox"
items={[
{ id: "a", title: "Invoice from Northworks" },
{ id: "b", title: "Team offsite dates" },
]}
itemLabel={(m) => m.title}
decisions={[
{ id: "archive", label: "Archive", direction: "left" },
{ id: "keep", label: "Keep", direction: "right", tone: "success" },
]}
renderItem={(m) => <h3 style={{ margin: 0, fontSize: 24 }}>{m.title}</h3>}
/>
);
}
This code, running — no configuration beyond the data
01 / 02
Left arrow: Archive. Right arrow: Keep. Backspace undoes.
Add this component to your project with the shadcn CLI. The command copies its source and styles into your configured UI directory.
npx shadcn@latest add 0xuser64bit/mizu/triage-deckFor npm imports, import mizu-ui/styles.css once. Fonts are optional via mizu-ui/fonts.css. Override --mizu-* tokens or use className for local styling. Requires React and Motion.
Source is included in the npm package under src/signature/TriageDeck.tsx.
| Prop | Type | Default | Description |
|---|---|---|---|
| label / items / renderItem | string / T[] / (item) => ReactNode | — | Region name, the queue (each with an id) and a card body. |
| itemLabel | (item) => string | — | A short name used in announcements and the deck's label. |
| decisions | TriageDecision[] | — | id, label, direction (left, right or up — one each) and tone. |
| onDecide / onUndo | (item, decision) => void | — | Record or reverse a decision. |
| empty | ReactNode | — | Shown when every item has been decided. |
The deck is a focusable group named after the current item and its position. Arrow keys make the decisions a fling would; every decision also has a labelled button with its key, and Backspace undoes. Each decision announces what happened and what comes next. Tallies are a labelled list.
The top card follows your hand and tilts with it; decision stamps fade in as you cross a threshold, and release velocity carries it off. The next card steps forward in depth, and an undone card flies back from the side it left by. Reduced motion decides without flight or tilt.