Loading component…
Loading component…
Open decisions with two quick answers each – answered ones confirm and fold away
To reuse this local React demo, copy all files from the Code tab into the same folder, then import DecisionInbox from ./decision-inbox.
import { DecisionInbox } from "@/components/ui/decision-inbox";
const decisions = [
{
id: "renewal",
title: "Renew Figma for the design team?",
detail: "12 seats · $1,800 per year · renews in 5 days",
primary: "Renew",
secondary: "Change seats",
},
];
export function Inbox() {
return <DecisionInbox decisions={decisions} onDecide={(d, answer) => save(d.id, answer)} />;
}| Name | Type | Default | Description |
|---|---|---|---|
| decisions | Decision[] | id, title, detail, primary and secondary answer, and collapsed to start folded | |
| onDecide | (decision, answer: "primary" \| "secondary") => void | Called when someone picks an answer | |
| className | string | Extra class on the tray |
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"
@import "tailwindcss"; in your main CSS file.