Project setup
Configure your Next.js project before installing Tailark items — shadcn initialization, components.json, path aliases, and monorepo layout.
For theme tokens, see Theme. Registry configuration is in Quick Setup.
Requirements
- A Next.js app using the App Router
- shadcn/ui initialized with a
components.jsonfile - For gated Quartz content: a Tailark API key from your Dashboard and an active plan
OSS kits (Mist, Dusk, Veil) do not require an account or API key.
Initialize shadcn
If you do not have shadcn/ui set up yet, run the init command in your project root. This creates components.json and adds the default path aliases.
Pick the style preset that matches your UI base:
- Base UI projects — use a
base-*style (for examplebase-nova) - Radix UI projects — use a
radix-*style (for exampleradix-vega)
Your style choice should align with the registry URL you configure in Quick Setup.
components.json
The components.json file is the entry point for the shadcn CLI. It tells the CLI where to install files, which Tailwind settings to use, and which registries you can install from.
Tailark page items declare install targets such as @app/(marketing)/layout.tsx, @types/post.ts, and @content/legal/terms-of-service.mdx. The CLI resolves those paths using the aliases map.
A minimal structure (add registries from Quick Setup):
Path aliases
Running npx shadcn@latest init adds components, utils, ui, lib, and hooks by default.
For Tailark Pages, also define app, types, and content so routes, shared types, and MDX content land in the correct directories.
Note
Match these paths to your project structure. Alias values must align with the
paths in your tsconfig.json.
Monorepo
The shadcn CLI understands monorepo layouts and installs files to the correct workspace paths. See the shadcn monorepo docs for the full reference.
Getting started
Scaffold a new monorepo with:
After adding registry entries and TAILARK_API_KEY to your app workspace, install Tailark items from the app path — not the repo root.
File structure
Monorepo requirements
- Every workspace needs a
components.json. - Define aliases per workspace. The app workspace needs
app,types, andcontentfor pages. - Register
@tailarkin the app workspace (with API key headers). Mirror inpackages/uiif you install blocks from there. - Keep
style,iconLibrary, andbaseColoraligned across workspaces. - For Tailwind CSS v4, leave
tailwind.configempty incomponents.json.
Example app workspace components.json:
Use /r/radix/{name}.json for both namespaces when your project uses Radix UI.
Import shared UI from the workspace package: