20% offProwith

Buy now

Docs

Get started.
Your first component in a minute.

Detent installs with the shadcn CLI, so every piece lands in your project as source you own. 18 components are free under MIT; the rest come with Pro.

With your coding agent

Paste this into Cursor, Claude Code or any agent. It reads the library and installs for you.

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 a component

Free components install from a public registry. Every component’s page has its own command.

  1. Set up shadcn

    Skip this if your project already has a components.json. You need React and Tailwind CSS v4; Next.js is what we test on.

    shadcn@latestinit
  2. Add Popup

    Its source lands in components/detent, ready to change. The first install also brings the Detent theme, and anything a piece needs, like motion, comes with it.

    shadcn addpopup
  3. Use it

    Import it like any of your own components.

    app/page.tsx
    import { Popup } from '@/components/detent/components/popup/Popup'
    
    export default function Page() {
      return (
        <Popup
          label="Repeat"
          options={['Every day', 'Weekdays', 'Never']}
          defaultValue="Every day"
        />
      )
    }
  4. Respect reduced motion

    Wrap your app once. Everything Detent animates then calms down for people who’ve asked their device for less motion.

    app/layout.tsx
    import { MotionConfig } from 'motion/react'
    
    export default function RootLayout({ children }) {
      return (
        <html lang="en">
          <body>
            <MotionConfig reducedMotion="user">{children}</MotionConfig>
          </body>
        </html>
      )
    }

Install Pro

Pro installs the same way, from a private registry that knows your key. Pro is $99, once, with every update for life.

  1. Make a key

    After you buy, make one on your account page. One per machine, and one for CI.

  2. Add the registry

    In components.json, beside what shadcn already wrote there.

    components.json
    {
      "registries": {
        "@detent-pro": {
          "url": "https://detentui.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${DETENT_PRO_KEY}" }
        }
      }
    }
  3. Add your key

    In .env.local, out of git. Give CI and your host the same variable.

    .env.local
    DETENT_PRO_KEY=dtnt_your-key
  4. Install anything

    Components and blocks by name, from their pages.

    shadcn add @detent-pro/glyph

If something goes wrong

pnpm stops with ERR_PNPM_IGNORED_BUILDS

That’s pnpm holding back Next.js’s own build scripts in a new project, not Detent. Run pnpm approve-builds, then install again.

A Pro install answers 401 or 403

Check that the key is in .env.local as DETENT_PRO_KEY, that the registry block is in components.json, and that the key is still listed on your account page.

Colours or type look unstyled

The theme stylesheet isn’t being loaded. The first install imports it into your global CSS; if you moved that file, import it again.

My coding agent installs the wrong thing

Point it at detentui.com/llms.txt first. It lists every component with the exact command that installs it, so the agent doesn’t have to guess.

Still stuck? Write to hello@detentui.com and we’ll help.

Where to next