clickworks
Docs / Getting started

Installation

Every work is a React component. It needs React 18 or newer and nothing else. No Tailwind, no animation library, no runtime package.

First time with shadcn

The CLI keeps its settings in components.json. If your project doesn't have one yet, create it once. Without it, the CLI stops to ask questions, which an agent or a script can't answer.

npx shadcn@latest init -d

Install with the shadcn CLI

Run this in your project. The CLI copies the component's files in and adds nothing else.

npx shadcn@latest add https://clickworks.dev/r/multitool-menu.json

Install by registry name

Add Clickworks to components.json once, then install any work by its short name.

{
  "registries": {
    "@clickworks": "https://clickworks.dev/r/{name}.json"
  }
}
npx shadcn@latest add @clickworks/telescope-search @clickworks/mail-slot

Where files go

Each work keeps its own folder, so updating or removing one never touches the others.

components/clickworks/<name>/react/The component you import
components/clickworks/<name>/element/The custom element
components/clickworks/<name>/core/Engine and styles

Without the CLI

Every work's page has a Manual tab with the full source of each file and the path it goes to. Copy them in and the part works the same. Tested in a plain React 18 project with Vite.

Frameworks

Parts render on the server in Next.js and load their element in the browser, so they work in the App Router without extra setup. They also work in Vite (tested with React 18), Remix and Astro islands. Each work's element runs on its own too, in plain HTML, Webflow or WordPress.