- Accordion
- Attachment
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Card
- Checkbox
- Code Block
- Collapsible
- Dialog
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Label
- Marker
- Message
- Number Flow
- Pagination
- Popover
- Progress
- Radio Group
- Select
- Slider
- Sonner
- Spinner
- Switch
- Tooltip
- Separator
- Sheet
- Tabs
- Textarea
- Toggle
- Toggle Group
- Trace
The components.json file holds the configuration for the Frakment CLI. npx frakment init writes it to your project root. All fields are optional — the defaults match a standard Next.js + Tailwind v4 setup.
Schema
{
"$schema": "https://www.arrafi.dev/frakment/schema.json",
"registry": "https://www.arrafi.dev/frakment/r",
"aliases": {
"components": "@/components",
"ui": "@/components/ui",
"utils": "@/lib/utils"
},
"tailwind": {
"css": "app/globals.css"
}
}Fields
registry
Base URL the CLI fetches components from. Defaults to https://www.arrafi.dev/frakment/r.
Override per-command with --registry <url>:
$ bunx --bun frakment add button --registry http://localhost:3000/r$ npx frakment add button --registry http://localhost:3000/r$ pnpm dlx frakment add button --registry http://localhost:3000/r$ yarn dlx frakment add button --registry http://localhost:3000/r
aliases
Import path prefixes rewritten in the installed component source. When the CLI writes a file, it replaces @/components/ui/, @/components/, and @/lib/utils with the values here. Match them to your tsconfig.json paths entries.
| Key | Default | Purpose |
|---|---|---|
components | @/components | Top-level components directory |
ui | @/components/ui | Component primitive directory |
utils | @/lib/utils | cn() helper path |
aliases controls the import statements inside installed files, not where the files are written. Write targets follow the registry payload paths, with a src/ prefix applied automatically when tailwind.css lives under src/.
tailwind
Tailwind v4 entry point. npx frakment init injects the theme block into this file.
| Key | Default | Purpose |
|---|---|---|
css | app/globals.css | Path to the CSS file that imports Tailwind |
platform
Marks the project as a web or Expo project. init --expo writes "platform": "expo".
| Value | Purpose |
|---|---|
web | Default. add reads registry and registries.web. |
expo | add --expo reads registries.expo. |
registries
Optional map of per-platform registry URLs. When present, add --expo reads registries.expo and add reads registries.web, falling back to registry.
{
"registries": {
"web": "https://www.arrafi.dev/frakment/r",
"expo": "https://www.arrafi.dev/frakment/r/expo"
}
}The --registry <url> flag overrides both maps for that run.
Minimal setup
{
"registry": "https://www.arrafi.dev/frakment/r",
"aliases": {
"components": "@/components",
"ui": "@/components/ui",
"utils": "@/lib/utils"
},
"tailwind": {
"css": "app/globals.css"
}
}Troubleshooting
"CSS file not found: app/globals.css"
The path in tailwind.css must exist and contain @import "tailwindcss";. Create the file first:
mkdir -p app && echo '@import "tailwindcss";' > app/globals.css"Component not found in registry"
The registry URL is unreachable. Check connectivity:
curl <registry>/index.jsonA 404 means the URL is wrong. A 000 means the host is unreachable.
Alias mismatch
If installed files import from @/components/ui/button but your project uses ~/ui/button, adjust aliases in components.json and re-run npx frakment add <component> --overwrite:
{
"aliases": {
"components": "~/components",
"ui": "~/ui",
"utils": "~/lib/utils"
}
}