=============== LIBRARY RULES =============== From library maintainers: - Install components with npx shadcn add @detent/; Pro pieces use @detent-pro/ and need DETENT_PRO_KEY. - Detent needs React 19 and Tailwind CSS v4; wrap the app once in . - Components install into components/detent and are meant to be edited, not wrapped. ### Prompt for building an agent dashboard with Detent Pro Source: https://detentui.com/pro Paste this prompt into a coding agent like Claude Code to build a complete agent dashboard using Detent Pro components. It instructs the agent to set up Detent, install the plan via `npx shadcn@latest add @detent-pro/plan-agent-dashboard`, follow the plan's spec, and run the checks before finishing. The prompt includes placeholders for the user's product description and assumes sensible defaults if unclear. ```markdown I'm building: an agent dashboard. I have Detent Pro. Build the whole dashboard in this project, finished and working, at the quality of Detent's own demos: every section in place, Detent components doing the heavy lifting, and everything else styled to match them. Go beyond the basics. It should look like a product someone paid for, not a starter template. 1. If Detent isn't set up in this project yet, follow https://detentui.com/setup.md. If the @detent-pro registry isn't connected yet, follow https://detentui.com/pro-setup.md (ask me for my key). 2. Run `npx shadcn@latest add @detent-pro/plan-agent-dashboard`. It adds .detent/plans/agent-dashboard.md, Detent's plan for an agent dashboard. Read it in full before writing code: it is the spec for the layout, the Detent piece in each section, the Detent look, the sample data and the checks for done. 3. Write down the sections you will build, shaped to my product, in a few lines. Then build them in order, installing each Detent piece the plan names. 4. Run the checks in the plan's “Before you say it's done” section and fix whatever fails. Shape it to what I described: keep the structure, and change sections, labels, metrics and sample data to fit my product. If this repo already has an app, fit into its routes, layout and data. If my product isn't clear from my words or the repo, make a sensible choice and tell me what you assumed. When you're done, tell me what you built section by section, which Detent pieces are on the page, what is still sample data or a placeholder, and paste the output of the checks you ran. ``` -------------------------------- ### PromptBox usage example Source: https://detentui.com/components/prompt A working example that typechecks against the installed piece. Use it as a starting point and swap the sample data for real data. Outer wrappers like `size-full` or a dark background come from the demo stage; give the parent a real size or drop them. The `send` function returns a promise so the box shows a working state until it settles. ```tsx 'use client' import { PromptBox } from '@/components/detent/components/prompt/PromptBox' import type { Message } from '@/components/detent/components/prompt/PromptBox' export function Composer() { // Return a promise: the box shows it is working until it settles. const send = async (message: Message) => { await fetch('/api/chat', { method: 'POST', body: JSON.stringify({ text: message.text, model: message.model }) }) } return ( console.log('stop')} /> ) } ``` -------------------------------- ### Install Task to merge with bun Source: https://detentui.com/blocks/task-to-merge Alternative installation command using bun for the Task to merge block. ```bash bunx --bun shadcn add @detent-pro/task-to-merge ``` -------------------------------- ### Install Settings block with npx shadcn Source: https://detentui.com/llms-full.txt Pro required. Installs the settings block via the shadcn CLI. ```bash npx shadcn add @detent-pro/settings ``` -------------------------------- ### Install Dusk template with npx shadcn add Source: https://detentui.com/llms-full.txt Install the Dusk template using the shadcn CLI. Requires a Pro subscription. ```bash npx shadcn add @detent-pro/template-dusk ``` -------------------------------- ### Phrase component example Source: https://detentui.com/components/phrase A working example that typechecks against the installed piece. Shows two Phrase instances mixing text, options, and numbers. Use as a starting point; outer wrappers like size-full come from the demo stage. ```tsx 'use client' import { Phrase } from '@/components/detent/components/phrase/Phrase' const n = (v: string | number) => Number(v) const fmt = (v: number) => v.toLocaleString('en-US') const WHO: Record = { 'at Acme': 48, 'I invite': 3 } export function PhraseExample() { return (
(who === 'on the web' ? `Public. Anyone who finds the link can ${can} it.` : `${WHO[who]} people can ${can} this right now.`)} /> (plan === 'yearly' ? `$${fmt(n(seats) * 120)} a year, two months free.` : `$${fmt(n(seats) * 12)} a month, $12 a seat.`)} />
) } ``` -------------------------------- ### Install @detent-pro/radar Source: https://detentui.com/llms-full.txt Install the Matchup component from Detent Pro. Requires the @detent-pro registry in components.json and DETENT_PRO_KEY set in .env.local. ```bash npx shadcn add @detent-pro/radar ``` -------------------------------- ### Install BaselineChart with shadcn Source: https://detentui.com/components/chart Install the BaselineChart component into your project as source you own. The chart is free under the MIT licence. ```bash npx shadcn@latest add https://detentui.com/r/chart ``` -------------------------------- ### Example usage of OutlookChart with history and forecast data Source: https://detentui.com/components/trend A working example that typechecks against the installed piece. Keep its layout as a starting point and swap the sample data for the project's real data. Outer wrappers like `size-full` or a dark background come from the demo stage: give the parent a real size, or drop them. ```tsx "use client" import { OutlookChart } from "@/components/detent/components/outlook/OutlookChart" import type { Ahead, Past } from "@/components/detent/components/outlook/OutlookChart" const history: Past[] = [ { label: "Oct 22", value: 410 }, { label: "Oct 23", value: 435 }, { label: "Oct 24", value: 428 }, { label: "Oct 25", value: 460 }, { label: "Oct 26", value: 482 }, ] const forecast: Ahead[] = [ { label: "Oct 27", low: 470, high: 505 }, { label: "Oct 28", low: 465, high: 530 }, { label: "Oct 29", low: 470, high: 560 }, { label: "Oct 30", low: 475, high: 595 }, ] export default function Page() { return (
console.log(i)} />
) } ``` -------------------------------- ### Install Phrase with shadcn add Source: https://detentui.com/components/phrase Install the Phrase component using the shadcn CLI. The command is run via npx, pnpm, bun, or yarn. ```bash npx shadcn addphrase ``` -------------------------------- ### Usage example for SignIn component Source: https://detentui.com/blocks/sign-in Example usage of the SignIn component with optional props: providers, workspaces, waiting, and onComplete callback. All props are optional; with none, it plays as demo and hands over to whoever touches it. ```tsx {}} /> ``` -------------------------------- ### Install Task to merge with yarn Source: https://detentui.com/blocks/task-to-merge Alternative installation command using yarn for the Task to merge block. ```bash yarn dlx shadcn add @detent-pro/task-to-merge ``` -------------------------------- ### MCP Install Component Source: https://detentui.com/components/mcp The MCP install component provides a UI for installing MCP servers into various editors. It supports configuration of server name, slug, URL, icon, description, clients, and more. It also handles copying configuration and creating API keys. ```APIDOC ## MCP Install Component ### Description The MCP install component provides a UI for installing MCP servers into various editors. It supports configuration of server name, slug, URL, icon, description, clients, and more. It also handles copying configuration and creating API keys. ### Props - `name` (string) - Required - Your server's name, shown in the title and configs. - `slug` (string) - Required - The key your server is saved under in each editor's config. - `url` (string) - Required - The remote server's URL. - `icon` (ReactNode) - Required - Your logo, shown in the dark tile. - `description` (string) - One line on what the server gives access to. - `clients` (McpClient[]) - Required - The editors to offer: an id, a label, an icon and an optional tint for the copy glow. - `tools` (number) - How many tools the server exposes, shown once connected. - `client` (McpClientId) - The editor to show, when you control it. Pair with onClientChange. - `defaultClient` (McpClientId) - The editor to start on when you don't control it. - `status` (McpStatus) - idle, waiting or connected. Drive it from your server; left out, copying sets waiting. - `auth` (string) - How the remote server signs in, shown in the header. Default `'OAuth'`. - `pkg` (string) - Your npm package. Set it to offer a Local option that runs it with npx. - `envVar` (string) - The environment variable the local server reads its key from. - `apiKey` (string) - A key to put in the local config. - `defaultTransport` (McpTransport) - Start on remote or local. Default `'remote'`. - `defaultScope` (McpScope) - Start on this project or everywhere. Default `'global'`. - `onClientChange` ((id: McpClientId) => void) - Called with the editor a person picks. - `onCopy` ((id: McpClientId) => void) - Called with the editor when the config is copied or Add to Cursor is pressed. - `onCreateKey` (() => string | Promise) - Makes a key when "Create one" is pressed; return it and it lands in the config. ``` -------------------------------- ### Initialize Dusk with npx dusk init Source: https://detentui.com/templates/dusk Command to start using Dusk for a free project. No card needed. ```bash npx dusk init ``` -------------------------------- ### DotHistogram full example with generated values Source: https://detentui.com/components/histogram Client component example that imports DotHistogram from '@/components/detent/components/viz/DotHistogram' and generates an array of 800 values using a deterministic formula. Use this as a starting point for a histogram that bins raw values and stacks dots to show distribution shape. ```tsx "use client" import { DotHistogram } from "@/components/detent/components/viz/DotHistogram" const values = Array.from({ length: 800 }, (_, i) => 90 + ((i * 7919) % 100)) ``` -------------------------------- ### Install Onboarding Block with shadcn Source: https://detentui.com/blocks/onboarding Use this command to add the Onboarding block to your project. It is available in the Pro package. ```bash shadcn add @detent-pro/onboarding ``` -------------------------------- ### Install @detent-pro/trace Source: https://detentui.com/llms-full.txt Install the Trace component from the Detent Pro registry. Requires the @detent-pro registry in components.json and DETENT_PRO_KEY set in .env.local. ```bash npx shadcn add @detent-pro/trace ``` -------------------------------- ### Install Live Features with shadcn Source: https://detentui.com/blocks/live-features Install the Pro live-features block using the shadcn CLI. The command is available for npx, pnpm, bun, and yarn package managers. ```bash shadcn add @detent-pro/live-features ``` -------------------------------- ### BaselineChart usage example in TSX Source: https://detentui.com/components/chart A working example that typechecks against the installed piece. Use as a starting point and replace sample data with real data. Outer wrappers like size-full or dark background come from the demo stage; give the parent a real size or drop them. The chart headline reads 'Since Sep 6, up $18,000 by Oct 8, or 42.7%'. Clicking a day glides to it, showing gain in blue and loss in red. Set look="plain" for flat fills. ```tsx "use client" import { BaselineChart } from "@/components/detent/components/baseline/BaselineChart" import type { Reading } from "@/components/detent/components/baseline/BaselineChart" const data: Reading[] = [ { label: "May", value: 12_400 }, { label: "Jun", value: 13_900 }, { label: "Jul", value: 13_200 }, { label: "Aug", value: 15_800 }, { label: "Sep", value: 17_100 }, { label: "Oct", value: 19_600 }, ] export default function Page() { return (
`$${n.toLocaleString("en-US")}`} onStart={(i) => console.log(i)} />
) } ``` -------------------------------- ### Install Metered Pricing with shadcn Source: https://detentui.com/blocks/pricing Install the metered pricing component using the shadcn CLI. The command is run with npx, pnpm, bun, or yarn. ```bash npx shadcn add @detent-pro/pricing ``` -------------------------------- ### Install Lasso scatter with shadcn Source: https://detentui.com/components/scatter Install the Lasso scatter component using the shadcn CLI. The command is available for npx, pnpm, bun, and yarn package managers. ```bash shadcn add @detent-pro/scatter ``` -------------------------------- ### Install Glyph art with shadcn Source: https://detentui.com/components/glyph Install the Glyph art component using the shadcn CLI. The command is run via npx, pnpm, bun, or yarn. ```bash npx shadcn add @detent-pro/glyph ``` -------------------------------- ### Install Task to merge with pnpm Source: https://detentui.com/blocks/task-to-merge Alternative installation command using pnpm for the Task to merge block. ```bash pnpm dlx shadcn add @detent-pro/task-to-merge ``` -------------------------------- ### Install RunTrace with shadcn CLI Source: https://detentui.com/components/trace Installs the RunTrace component from the @detent-pro registry. Requires the Detent Pro registry to be configured in the project. ```bash npx shadcn@latest add @detent-pro/trace ``` -------------------------------- ### Install PromptBox with shadcn Source: https://detentui.com/components/prompt Install the PromptBox component into your project using the shadcn CLI. The command adds PromptBox and PromptStarters as source you own. ```bash npx shadcn@latest add https://detentui.com/r/prompt ``` -------------------------------- ### Install Onboarding block with npx shadcn Source: https://detentui.com/llms-full.txt Requires a Pro subscription. Run this command to add the @detent-pro/onboarding block to your project. ```bash npx shadcn add @detent-pro/onboarding ``` -------------------------------- ### Install Phrase component Source: https://detentui.com/llms-full.txt Install the free, MIT-licensed Phrase component using npx shadcn add. ```bash npx shadcn add https://detentui.com/r/phrase ``` -------------------------------- ### Install Ask filter with shadcn add Source: https://detentui.com/components/filter Install the Ask filter component using the shadcn CLI. The command is available for npm, pnpm, bun, and yarn package managers. ```bash shadcn add @detent-pro/filter ``` -------------------------------- ### Install MCP component with shadcn Source: https://detentui.com/components/mcp Use this command to install the MCP component from the @detent-pro/mcp package. It is available via npx, pnpm, bun, and yarn package managers. ```bash shadcn add @detent-pro/mcp ``` -------------------------------- ### Install Hello globe with shadcn CLI Source: https://detentui.com/components/hello Run this command to add the @detent-pro/hello component to your project. It is a Pro component and requires a Pro license. ```bash shadcn add @detent-pro/hello ``` -------------------------------- ### Install Support Inbox with shadcn Source: https://detentui.com/blocks/support-inbox Install the support inbox component using the shadcn CLI. The command is run via npx, pnpm, bun, or yarn. ```bash npx shadcn add @detent-pro/support-inbox ``` -------------------------------- ### Install live-features block with npx shadcn Source: https://detentui.com/llms-full.txt Install the Pro-required live-features block using the shadcn CLI. Run this command in your project directory. ```bash npx shadcn add @detent-pro/live-features ``` -------------------------------- ### Install DotHistogram with shadcn Source: https://detentui.com/components/histogram Install the DotHistogram component from the Detent Pro registry. Requires the @detent-pro registry to be configured in your project. ```bash npx shadcn@latest add @detent-pro/histogram ``` -------------------------------- ### Install OutlookChart with shadcn Source: https://detentui.com/components/trend Install the OutlookChart component into your project as source you own. Free under the MIT licence. ```bash npx shadcn@latest add https://detentui.com/r/trend ``` -------------------------------- ### Install ModelPicker with npx shadcn latest add Source: https://detentui.com/components/models Install the ModelPicker component directly from the detentui registry using npx. This installs the component as source you own under the MIT licence. ```shell npx shadcn@latest add https://detentui.com/r/models ``` -------------------------------- ### Install FAQ block with npx shadcn Source: https://detentui.com/llms-full.txt Use this command to add the FAQ block to your project. It fetches the component from the Detent registry. ```bash npx shadcn add https://detentui.com/r/faq ``` -------------------------------- ### Install Calendar with shadcn add Source: https://detentui.com/blocks/calendar Install the Detent Calendar block using the shadcn CLI. The command is run via npx, pnpm, bun, or yarn. ```bash shadcn add @detent-pro/calendar ``` -------------------------------- ### Agent Prompt to Install Popup Source: https://detentui.com/llms-full.txt Paste this into Cursor, Claude Code, or any agent to read the Detent library and install the Popup component. It instructs the agent to run shadcn init if components.json is missing. ```text Read https://detentui.com/llms.txt to learn the Detent component library. Then install the Popup component into this project with the shadcn CLI, using the exact command listed there, and use it on the home page. If the project has no components.json yet, run shadcn init first. ``` -------------------------------- ### Install Diff component with shadcn Source: https://detentui.com/llms-full.txt Install the free, MIT-licensed Diff component using the shadcn CLI. Run this command in your project directory. ```bash npx shadcn add https://detentui.com/r/diff ``` -------------------------------- ### Install Region wheel with shadcn add Source: https://detentui.com/components/region Install the Region wheel component using the shadcn CLI. The command is run with npx, pnpm, bun, or yarn. ```bash shadcn add @detent-pro/region ``` -------------------------------- ### Install agent-chat block Source: https://detentui.com/llms-full.txt Install the Pro-required agent chat block using the shadcn CLI. Run this command in your project directory. ```bash npx shadcn add @detent-pro/agent-chat ``` -------------------------------- ### Install support chat with shadcn add Source: https://detentui.com/components/support-chat Install the @detent-pro/support-chat component using the shadcn CLI. The command is available for npx, pnpm, bun, and yarn package managers. ```bash shadcn add @detent-pro/support-chat ``` -------------------------------- ### Install FlowFunnel with shadcn Source: https://detentui.com/components/funnel Install the FlowFunnel component from the Detent Pro registry. Requires the @detent-pro registry to be configured in your project. ```bash npx shadcn@latest add @detent-pro/funnel ``` -------------------------------- ### Install sign-in block with shadcn Source: https://detentui.com/llms-full.txt Use this command to add the Detent sign-in block to your project via shadcn. It installs the block from the provided URL. ```bash npx shadcn add https://detentui.com/r/sign-in ``` -------------------------------- ### Install diff component with shadcn Source: https://detentui.com/components/diff Install the diff review component into your project using the shadcn CLI. The command adds the component as source code you own. ```bash npx shadcn@latest add https://detentui.com/r/diff ``` -------------------------------- ### Install @detent-pro/filter Source: https://detentui.com/llms-full.txt Run this command to add the Ask filter component. Requires the @detent-pro registry in components.json and DETENT_PRO_KEY set in .env.local. ```bash npx shadcn add @detent-pro/filter ``` -------------------------------- ### initial Source: https://detentui.com/components/askchart A first question and its answer to start from. ```APIDOC ## initial ### Description A first question and its answer to start from. ### Type - **Step** - A first question and its answer. ``` -------------------------------- ### Install Outlook chart with npx shadcn add Source: https://detentui.com/llms-full.txt Installs the free, MIT-licensed Outlook chart component from the Detent registry. Run in a terminal. ```bash npx shadcn add https://detentui.com/r/trend ``` -------------------------------- ### Install @detent-pro/bridge Source: https://detentui.com/llms-full.txt Install the bridge component with npx shadcn add. Requires the @detent-pro registry in components.json and DETENT_PRO_KEY set in .env.local. ```bash npx shadcn add @detent-pro/bridge ``` -------------------------------- ### Install testimonials block with shadcn Source: https://detentui.com/llms-full.txt Run this command to add the testimonials block to your project. It fetches the component from the Detent registry. ```bash npx shadcn add https://detentui.com/r/testimonials ``` -------------------------------- ### Install Voice note component Source: https://detentui.com/llms-full.txt Install the Voice note component via npx shadcn. The package is free and MIT licensed. ```bash npx shadcn add https://detentui.com/r/voicenote ``` -------------------------------- ### Full page example with AskChart and ask function Source: https://detentui.com/components/askchart Complete page example ready to paste. Includes a mock ask function that returns a ChartAnswer with sample data, and renders AskChart with placeholder and onAnswer callback. Swap the ask function for a call to your own model or route. ```tsx "use client" import { AskChart } from "@/components/detent/components/askchart/AskChart" import type { ChartAnswer } from "@/components/detent/components/askchart/AskChart" // Swap this for a call to your own model or route. async function ask(question: string): Promise { return { headline: "Europe is catching up with the US", detail: `Your question: ${question}`, categories: ["Q1", "Q2", "Q3", "Q4"], series: [ { id: "us", label: "United States", values: [1_120_000, 1_160_000, 1_140_000, 1_180_000] }, { id: "eu", label: "Europe", values: [760_000, 880_000, 960_000, 1_050_000] }, ], lead: "eu", format: "currency", kind: "bars", source: "Sales ledger", } } export default function Page() { return (
console.log(q, a)} />
) } ``` -------------------------------- ### Install Testimonials Block with shadcn Source: https://detentui.com/blocks/testimonials Run this command to add the Testimonials block to your project. The package manager can be npx, pnpm, bun, or yarn. ```bash npx shadcn add testimonials ``` -------------------------------- ### Install @detent-pro/region Source: https://detentui.com/llms-full.txt Install the Region wheel component from the Detent Pro registry. Requires the @detent-pro registry in components.json and DETENT_PRO_KEY set in .env.local. ```bash npx shadcn add @detent-pro/region ``` -------------------------------- ### Install Agent Chat with shadcn Source: https://detentui.com/blocks/agent-chat Install the Agent Chat block using the shadcn CLI. The command is run with npx, pnpm, bun, x, or yarn. ```bash shadcn add @detent-pro/agent-chat ``` -------------------------------- ### Install Rewrite component with npx shadcn Source: https://detentui.com/llms-full.txt Install the free, MIT-licensed Rewrite component using the shadcn CLI. Run this command in your project directory. ```bash npx shadcn add https://detentui.com/r/rewrite ``` -------------------------------- ### Install Thread hero component Source: https://detentui.com/llms-full.txt Install the Thread hero component from the Detent Pro registry. Requires the @detent-pro registry in components.json and DETENT_PRO_KEY set in .env.local. ```bash npx shadcn add @detent-pro/threads ``` -------------------------------- ### Install Settings block with shadcn Source: https://detentui.com/blocks/settings Use this command to add the @detent-pro/settings component to your project. It is a Pro block, so a Pro license is required. ```bash shadcn add @detent-pro/settings ``` -------------------------------- ### Install Thread Hero with shadcn CLI Source: https://detentui.com/components/threads Install the Thread Hero component using the shadcn CLI. The command is shown for multiple package managers (npx, pnpm, bun, yarn) but the actual command is the same. ```bash shadcn add @detent-pro/threads ``` -------------------------------- ### Install Integrations block with npx shadcn add Source: https://detentui.com/llms-full.txt Use this command to install the Integrations block from Detent UI. It adds the component to your project via the shadcn CLI. ```bash npx shadcn add https://detentui.com/r/integrations ``` -------------------------------- ### Install Detent Popup Component with shadcn Source: https://detentui.com/llms-full.txt Use this command to install the first Detent component via shadcn. It adds the popup component from the Detent registry. ```bash npx shadcn add https://detentui.com/r/popup ``` -------------------------------- ### Install CTA block with shadcn Source: https://detentui.com/llms-full.txt Use this command to add the Detent call-to-action block to your project. It installs the component via the shadcn CLI from the provided URL. ```bash npx shadcn add https://detentui.com/r/cta ``` -------------------------------- ### Install Emoji picker with shadcn add Source: https://detentui.com/components/emoji Install the Emoji picker component using the shadcn CLI. The command is available for npx, pnpm, bun, and yarn package managers. ```bash shadcn add @detent-pro/emoji ``` -------------------------------- ### Install Voice Mode with shadcn Source: https://detentui.com/blocks/voice-mode Install the Voice Mode block using the shadcn CLI. The command is available for npx, pnpm, bun, and yarn package managers. ```bash npx shadcn add @detent-pro/voice-mode ``` -------------------------------- ### Install Agent wallet with shadcn Source: https://detentui.com/components/agent-wallet Install the Agent wallet component using the shadcn CLI with the package @detent-pro/agent-wallet. Available via npx, pnpm, bun, and yarn. ```bash npx shadcn add @detent-pro/agent-wallet ``` -------------------------------- ### Install Prompt box with npx shadcn Source: https://detentui.com/llms-full.txt Free, MIT licensed. Run this command to add the Prompt box component to your project. ```bash npx shadcn add https://detentui.com/r/prompt ``` -------------------------------- ### Install ModelPicker with shadcn add models Source: https://detentui.com/components/models Install the Model & effort component using the shadcn CLI. The command is run in a terminal and adds the component to your project. ```shell npx shadcn add models ``` -------------------------------- ### Basic usage of MetricExplainer Source: https://detentui.com/components/metric Minimal usage example showing the MetricExplainer component with a metrics prop. The metrics array is not defined here; see the full example for a complete setup. ```tsx ``` -------------------------------- ### Install Dusk template with shadcn Source: https://detentui.com/templates/dusk Command to add the Dusk template to your project using shadcn. Available package managers: npx, pnpm, bun, yarn. ```bash shadcn add @detent-pro/template-dusk ``` -------------------------------- ### Install Rewind with shadcn add Source: https://detentui.com/components/rewind Command to add the Rewind component to your project using shadcn CLI. ```bash shadcn addrewind ``` -------------------------------- ### Install Detent Template with npx shadcn Source: https://detentui.com/llms-full.txt Use this command to add the Detent template to your project. Requires a Pro subscription. ```bash npx shadcn add @detent-pro/template-detent ``` -------------------------------- ### Install Code Review block with shadcn Source: https://detentui.com/blocks/code-review Install the Code Review block using the shadcn CLI. The command uses the package @detent-pro/code-review and can be run with npx, pnpm, bun, or yarn. ```bash shadcn add @detent-pro/code-review ``` -------------------------------- ### CashForecast usage example Source: https://detentui.com/components/forecast Minimal usage of the CashForecast component with required props: start, past, plan, scenarios, onAsk, onToggle, onRemove. ```tsx ``` -------------------------------- ### Install Detent Prompt box with shadcn Source: https://detentui.com/components/prompt Run from the project root after initializing shadcn if needed. Requires React 19 and Tailwind CSS v4. ```bash npx shadcn@latest init --defaults --yes ``` ```bash npx shadcn@latest add https://detentui.com/r/prompt ``` -------------------------------- ### Install Metric component with npx shadcn Source: https://detentui.com/llms-full.txt Free, MIT licensed. Run this command to add the Metric component to your project. ```bash npx shadcn add https://detentui.com/r/metric ``` -------------------------------- ### Install code-review block with npx shadcn Source: https://detentui.com/llms-full.txt Requires a Pro subscription. Run this command to add the code-review block to your project. ```bash npx shadcn add @detent-pro/code-review ``` -------------------------------- ### Install Upload component with shadcn Source: https://detentui.com/components/upload Run this command to add the Upload component to your project using shadcn. Supports npx, pnpm, bun, and yarn package managers. ```bash npx shadcn add upload ``` -------------------------------- ### Install Detent theme with shadcn Source: https://detentui.com/llms-full.txt Use this command to install the Detent design system theme via shadcn. It inherits your existing colors and fonts, and enables the dark variant automatically when the HTML element has the class 'dark'. ```bash npx shadcn add https://detentui.com/r/theme.json ``` -------------------------------- ### Full page example with MetricExplainer Source: https://detentui.com/components/metric Complete page component that imports MetricExplainer and Metric type, defines a metrics array with formatted values and driver details, and renders the component with additional props like defaultMetric, period, and onMetricChange. The example includes a dollars formatter and uses a client-side directive. ```tsx "use client" import { MetricExplainer } from "@/components/detent/components/metric/MetricExplainer" import type { Metric } from "@/components/detent/components/metric/MetricExplainer" const dollars = (n: number) => `$${Math.round(n).toLocaleString("en-US")}` const metrics: Metric[] = [ { id: "burn", name: "Burn", value: 84_200, previous: 71_790, format: dollars, vs: "September", reason: "Burn rose mostly because of the new AWS region, with contractor spend close behind.", basis: "From 1,284 transactions in the ledger", drivers: [ { name: "AWS", note: "the new eu-west region, live since Oct 9", amount: 8_920, phrase: "the new AWS region" }, { name: "Contractors", note: "two designers for the launch", amount: 5_400, phrase: "contractor spend" }, { name: "Software", note: "annual renewals moved to monthly", amount: -1_910 }, ], }, { id: "revenue", name: "Revenue", value: 212_500, previous: 196_300, format: dollars, vs: "September", reason: "Revenue grew on enterprise upgrades, slightly offset by churn in the starter plan.", drivers: [ { name: "Enterprise", note: "three accounts moved up a plan", amount: 19_400, phrase: "enterprise upgrades" }, { name: "Starter churn", note: "41 accounts left", amount: -3_200, phrase: "churn" }, ], }, ] export default function Page() { return (
console.log(id)} />
) } ``` -------------------------------- ### Full page example with RadarCompare in page.tsx Source: https://detentui.com/components/radar Complete client-side page that imports RadarCompare and RadarSeries, defines sample axes and series data, and renders the component with initialPair and onPair props. The onPair callback logs the selected pair to the console. ```tsx "use client" import { RadarCompare } from "@/components/detent/components/viz/RadarCompare" import type { RadarSeries } from "@/components/detent/components/viz/RadarCompare" const axes = ["Speed", "Accuracy", "Cost", "Context", "Tools"] const series: RadarSeries[] = [ { id: "fast", label: "Fast model", hue: 250, values: [0.95, 0.7, 0.9, 0.55, 0.65] }, { id: "deep", label: "Deep model", hue: 25, values: [0.55, 0.96, 0.4, 0.92, 0.88] }, { id: "small", label: "Small model", hue: 150, values: [0.98, 0.55, 0.97, 0.35, 0.4] }, ] export default function Page() { return (
console.log(pair)} />
) } ``` -------------------------------- ### Rewrite component usage example Source: https://detentui.com/components/rewrite Shows how to use the Rewrite component with text and rewrite props. ```tsx ``` -------------------------------- ### Install Rewind component with shadcn Source: https://detentui.com/llms-full.txt Free, MIT licensed. Run this command to add the Rewind component to your project. ```bash npx shadcn add https://detentui.com/r/rewind ``` -------------------------------- ### Usage example for Upload component Source: https://detentui.com/components/upload Basic usage of the Upload component. The component accepts an `accept` string prop (default 'PNG, JPG, PDF or MP4') and an `onFiles` callback that receives the dropped or picked files. Also exposes `hover()`, `drop()`, and `clear()` methods via a ref. ```tsx ``` -------------------------------- ### Render HelloGlobe component Source: https://detentui.com/components/hello Usage example for the HelloGlobe component. The code shows a JSX element that renders the component. ```tsx ``` -------------------------------- ### Install Halo component with shadcn Source: https://detentui.com/llms-full.txt Adds the Halo component to your project. Requires npx and shadcn CLI. ```bash npx shadcn add https://detentui.com/r/halo ``` -------------------------------- ### Install data table with npx shadcn add Source: https://detentui.com/llms-full.txt Pro required. Run this command to add the data table block to your project. ```bash npx shadcn add @detent-pro/data-table ``` -------------------------------- ### Install Upload component with npx shadcn Source: https://detentui.com/llms-full.txt Adds the free, MIT-licensed Upload component to your project. Run in the project root. ```bash npx shadcn add https://detentui.com/r/upload ``` -------------------------------- ### Install Calendar block with npx shadcn Source: https://detentui.com/llms-full.txt Requires a Pro subscription. Run this command to add the @detent-pro/calendar block to your project. ```bash npx shadcn add @detent-pro/calendar ``` -------------------------------- ### Basic usage of FlowFunnel Source: https://detentui.com/components/funnel Minimal example showing how to render the FlowFunnel component with a stages prop. The stages array must be provided as it is required. ```tsx ``` -------------------------------- ### Install Evals block with npx shadcn Source: https://detentui.com/llms-full.txt Pro required. Run this command to add the Evals block to your project. ```bash npx shadcn add @detent-pro/evals ``` -------------------------------- ### Install models component with shadcn Source: https://detentui.com/llms-full.txt Free, MIT licensed. Run this command to add the models component to your project. ```bash npx shadcn add https://detentui.com/r/models ``` -------------------------------- ### Install Evals block with shadcn Source: https://detentui.com/blocks/evals Use this command to add the Evals block to your project. It is a Pro component and requires a Pro subscription. ```bash shadcn add @detent-pro/evals ``` -------------------------------- ### Onboarding component usage Source: https://detentui.com/blocks/onboarding All props are optional; with none, the block plays its demo and hands over to whoever touches it. The component accepts tools, teammates, product, and callbacks for connect, invite, and complete events. ```jsx {}} onInvite={(emails) => {}} onComplete={(setup, tools, invited, agent) => {}} /> ``` -------------------------------- ### Install rings component with npx shadcn Source: https://detentui.com/llms-full.txt Free, MIT licensed. Run this command to add the rings component to your project. ```bash npx shadcn add https://detentui.com/r/rings ``` -------------------------------- ### Install Announcement Pill with npx shadcn Source: https://detentui.com/llms-full.txt Free, MIT licensed. Run this command to add the Announcement Pill component to your project. ```bash npx shadcn add https://detentui.com/r/announce ``` -------------------------------- ### Install Period picker with shadcn add Source: https://detentui.com/components/dates Run this command to add the @detent-pro/dates component to your project. The package manager can be npx, pnpm, bun, or yarn. ```bash shadcn add @detent-pro/dates ``` -------------------------------- ### Install Task to merge with npx Source: https://detentui.com/blocks/task-to-merge Use this command to add the Task to merge block to your project. It is a Pro component and requires a Pro subscription. ```bash npx shadcn add @detent-pro/task-to-merge ``` -------------------------------- ### Install AgentCanvas with npx shadcn Source: https://detentui.com/components/agent-canvas Install the AgentCanvas component from the Detent Pro registry using npx. Requires the @detent-pro registry in your project. ```bash npx shadcn@latest add @detent-pro/agent-canvas ``` -------------------------------- ### Initialize shadcn Source: https://detentui.com/llms-full.txt Run this to set up shadcn in a project without components.json. Requires React and Tailwind CSS v4; Next.js is the tested framework. ```bash npx shadcn@latest init ``` -------------------------------- ### Install Sign In block with shadcn add Source: https://detentui.com/blocks/sign-in Command to add the Sign In block to your project using shadcn CLI. Supports multiple package managers (npx, pnpm, bun, yarn). ```bash npx shadcn add sign-in ``` -------------------------------- ### Install AskChart component Source: https://detentui.com/llms-full.txt Adds the AskChart component from the Detent Pro registry. Requires the @detent-pro registry in components.json and DETENT_PRO_KEY set in .env.local. ```bash npx shadcn add @detent-pro/askchart ``` -------------------------------- ### Onboarding Component Source: https://detentui.com/blocks/onboarding The Onboarding component is a React component that renders an onboarding flow. It accepts optional props for tools, teammates, product, assistant, workspace, and callbacks for connect, invite, and complete events. ```APIDOC ## Onboarding Component ### Description The Onboarding component renders an onboarding flow. It accepts optional props for tools, teammates, product, assistant, workspace, and callbacks for connect, invite, and complete events. ### Usage ``` {}} onInvite={(emails) => {}} onComplete={(setup, tools, invited, agent) => {}} /> ``` ### Props #### Data Props - **tools** (`Tool[]`) - Optional - The tools on offer, each with the account it connects to. - **teammates** (`Teammate[]`) - Optional - People suggested for an invite, e.g. from the GitHub organization. - **product** (`string`) - Optional - The product being set up. Default: `'Detent'` - **assistant** (`string`) - Optional - What the first agent is called. Default: `'Detent'` - **workspace** (`string`) - Optional - The workspace being set up, named in the preview. Default: `'Harbor'` #### Callback Props - **onConnect** (`(tool: App) => void`) - Optional - Called with a tool’s id when a person connects it. - **onInvite** (`(emails: string[]) => void`) - Optional - Called with the addresses a person invites. - **onComplete** (`(setup: { tools: App[]; invited: string[]; agent: string }) => void`) - Optional - Called when setup finishes, with what was connected, who was invited and the agent created. #### Common Props - **accent** - Optional - The one colour everything in it derives from. - **autoplay** - Optional - Plays the demo until someone touches it. - **className** - Optional - Additional CSS class name. ``` -------------------------------- ### FAQ component usage Source: https://detentui.com/blocks/faq Shows how to render the FAQ block with all optional props. With none, it plays exactly as it does here and hands over to whoever touches it. ```tsx {}} onContact={() => {}} onFeedback={(id, helpful) => {}} /> ```