Repository avatar
AI Tools
v1.0.0
active

detent

io.github.ds-spec/detent

Find, read and install Detent React components and AI product screens from your coding agent.

Documentation

Detent UI: React components, blocks and templates for AI apps

Detent UI

React components, blocks and templates for AI apps, agent interfaces and interactive charts.
Install with the shadcn CLI. The source is yours to change.

MIT licence shadcn registry React 19 Tailwind CSS v4 TypeScript GitHub stars

Website · Components · Blocks · Docs · llms.txt · Pro


Detent UI is a React component library for products built on AI: prompt boxes, model pickers, diff review, voice notes, explained metrics and charts you can click into. Every piece ships with its motion, its states (loading, empty, error, where they apply) and reduced-motion support already worked out. You install it with the shadcn CLI, so the TypeScript source lands in your project and you own it.

  • 21 free components and 5 free blocks, MIT licensed
  • Built for React 19, Tailwind CSS v4 and Next.js (App Router), animated with Motion
  • Styled by your shadcn theme, light and dark
  • Readable by coding agents: llms.txt and a markdown copy of every page
  • Need whole screens, not only parts? Detent Pro adds 21 components, 14 full-screen blocks and 2 templates, for one payment
Baseline chart: interactive React line chart where any day becomes the baselineMetric explainer: React KPI card with the change in words and its drivers
Prompt box: AI chat input component for ReactDiff review: code diff viewer for reviewing AI agent changes
Outlook chart: forecast chart with a confidence bandModel and effort: AI model picker with reasoning effort and cost

Templates: try them live

Two whole products you can click through right now, before you install anything. Both come with Detent Pro.

Detent template: AI agent workspace in React with a live plan, code diff and approvalsDusk template: landing page for an AI agent built with React and Tailwind
Detent, the app for an AI agent. Users chat with it, watch every step it takes and approve before it acts.
Open the live demo →
Dusk, the landing page for an AI agent. The product works in every section: hero, how it works, customers, pricing.
Open the live demo →

Moving off AI Elements?

Vercel's AI Elements is moving to shadcn/ui, and 23 of its files were not rebuilt. The code you copied keeps working. Where you want a finished piece instead, these Detent components do the same job:

AI Elements fileDetent piece
prompt-input.tsxPrompt boxFree
model-selector.tsxModel & effortFree
audio-player.tsx, transcription.tsxVoice noteFree
confirmation.tsxAgent chat, with tool approvalsPro
artifact.tsx, canvas.tsxAgent canvasPro

What moved where and what to use for the rest: AI Elements is being deprecated, and six alternatives compared.

Quick start

Pick a component on detentui.com/components and run its command:

npx shadcn@latest add https://detentui.com/r/popup

The source lands in components/detent. The first install also adds the Detent theme, and anything a piece depends on, such as motion, comes with it. Swap the name for any piece in the tables below: npx shadcn@latest add https://detentui.com/r/<name>.

Requirements: React 19 and Tailwind CSS v4. Next.js is what we test on; Vite with React works the same way.

Wrap your app once so the motion calms down for people who have asked their device for less of it:

import { MotionConfig } from 'motion/react'

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <MotionConfig reducedMotion="user">{children}</MotionConfig>
      </body>
    </html>
  )
}

Free components

All 21 are MIT licensed. Click a name for the live demo, props and code.

AI chat and agent UI

ComponentWhat it doesInstall name
Prompt boxAI chat input whose tray slides out to say what the model is doingprompt
Model & effortAI model picker: choose a model, drag how hard it thinks, see the costmodels
Diff reviewReview an AI agent's code change hunk by hunk, unified or splitdiff
RewriteSelect a phrase, say how it should read, accept the AI rewrite with Tabrewrite
Voice noteAudio player with a waveform that inks in and a transcript that followsvoicenote
BuddyAn animated face for your AI assistant, with moods that react to the userbuddy
AI calendarWeek calendar where you add events by typing, with a live draft and clash warningsweek

Charts and data visualisation

ComponentWhat it doesInstall name
Baseline chartInteractive line chart: click any day to compare everything against itchart
Outlook chartForecast chart drawn as a confidence band that thins where it's less certaintrend
Metric explainerKPI card: the number, its change in words and the drivers behind itmetric
Goal numeralsGoal progress as soft bars with big percentages, flicked through by monthrings
ShiftAnalytics breakdown as a list, bars or change, every number animating to its placeshift

Inputs and interactions

ComponentWhat it doesInstall name
PopupRadial context menu that opens around your finger: press, slide, let gopopup
PhraseSettings written as one sentence, with words to pick and numbers to dragphrase
RewindTextarea with history you can scrub back through, deleted words returning in colourrewind
UploadFile upload dropzone: files tip the folder open and fall in as sheetsupload
Live listReal-time collaborative checklist, each item arriving with who added itlivelist
VaultWeb3 deposit and withdraw card with every wallet and chain state handledvault

Text and background effects

ComponentWhat it doesInstall name
Halo bandsGlow background that restarts at every curved edge and follows the pointerhalo
Announcement pillThe badge above a hero headline, with a line of light that runs round it onceannounce
Slice textAnimated text: strips fly in, align into letters, then cut apart around the pointerslices

Free blocks

Whole page sections, built from the components and wired up.

BlockWhat it isInstall name
FAQFAQ section, searched as you typefaq
TestimonialsTestimonial section with the numbers behind each quotetestimonials
IntegrationsIntegrations grid: your stack, through glassintegrations
Sign inSign-in page: one press, or a code by emailsign-in
Call to actionCTA section: one line, and an email field to startcta

Use Detent UI with coding agents

Detent is set up so Cursor, Claude Code, Codex, Copilot and other agents install the right piece with the right props instead of guessing.

  • MCP server: a remote MCP server at https://detentui.com/mcp (Streamable HTTP, no key needed). Your agent can find pieces for what you're building, get one's props, placement and example, and install it with the exact shadcn command. Listed in the official MCP Registry as io.github.ds-spec/detent. The source is in src/app/mcp and src/lib/mcp.

    claude mcp add --transport http detent https://detentui.com/mcp
    

    In Cursor or any other client, add { "mcpServers": { "detent": { "url": "https://detentui.com/mcp" } } } to your mcp.json.

  • llms.txt: point your agent at detentui.com/llms.txt. It lists every component with the command that installs it. Add .md to any page address for a markdown version.

  • Context7: indexed at context7.com/ds-spec/detent-ui for agents that use it for docs.

Detent Pro

For teams shipping an AI product who want the whole screen, not only the parts. One payment, every update for life, unlimited projects.

  • 21 more components, including a trace viewer for agent runs, extraction review, ask-your-data charts, a radar chart, lasso scatter plot, dot histogram, funnel and revenue bridge (waterfall) charts, a date range picker, an emoji picker, an agent wallet, a support chat and MCP install, which writes the real config for Cursor, Claude Code, Windsurf and Zed
  • 14 full-screen blocks: agent dashboard, agent chat, evals, code review, task to merge, incident, support inbox, data table, calendar, voice mode, settings, onboarding, metered pricing and live features
  • 2 templates: an AI agent workspace app (sessions, a thread that shows its work, approvals, a composer with tools and skills) and Dusk, a landing page for an AI agent

See everything and the current price at detentui.com/pro.

Pro source lives in a private repository. Without it, this one still builds and runs: each Pro preview becomes a locked stand-in from src/locked.

FAQ

Is Detent UI free?

Yes. The 21 components and 5 blocks listed above are free and MIT licensed, for personal and commercial projects. Detent Pro is a one-time purchase for the additional pieces.

How is Detent UI different from shadcn/ui?

shadcn/ui gives you the primitives: buttons, dialogs, inputs. Detent builds on the same CLI and theme to give you the finished, interactive pieces an AI product needs, such as a prompt box, a model picker, diff review and explained charts. They work side by side in the same project.

Does it work without Next.js?

Yes. The components are React 19 with Tailwind CSS v4. Next.js is what we test on; Vite with React works the same way, with the install paths adjusted.

Does it support dark mode and reduced motion?

Yes. Every piece follows your shadcn theme in light and dark, and respects prefers-reduced-motion through Motion's MotionConfig.

Can my coding agent use it?

Yes. See Use Detent UI with coding agents.

Run the site locally

git clone https://github.com/ds-spec/detent-ui.git
cd detent-ui
npm install
npm run dev
FolderWhat's in it
src/labThe free components and blocks, their demos, and the motion they share
src/catalogWhat every piece is, and the registry the shadcn CLI installs from
src/siteThe website around them: gallery, pages and code browser
src/appThe Next.js routes

Issues and feedback

Found a bug or something that feels off? Open an issue. Small, specific reports help most: what you did, what you expected, and what happened.

If Detent saved you time, a ⭐ helps other developers find it.

Licence

The free components and this site's code are MIT. Detent Pro has its own licence.

No installation packages available.

Remote