shadcn CLI
Install newt/ui components with the shadcn or shadcn-vue CLI, in a project that already uses shadcn/ui.
The newt/ui registry uses the shadcn registry schema. The shadcn CLI for
React and the shadcn-vue CLI for Vue install from it directly. You do not
need newtui for this.
Use this path when your project already runs shadcn init. In a new project,
newtui init sets up the same files in one step.
Add the registry
Add a registries entry to the components.json that shadcn init wrote.
The name @newtui is the namespace every newt/ui item uses for the items it
depends on, so keep that name.
{
"registries": {
"@newtui": "https://newtui.dev/r/{name}.json"
}
}{
"registries": {
"@newtui": "https://newtui.dev/vue/r/{name}.json"
}
}Add the tokens
Every component reads the --newt-* tokens. Add them once. The CLI appends
the tokens and their Tailwind CSS v4 utilities to your global stylesheet.
npx shadcn@latest add @newtui/theme-newtpnpm dlx shadcn@latest add @newtui/theme-newtyarn dlx shadcn@latest add @newtui/theme-newtbunx shadcn@latest add @newtui/theme-newtdeno run -A npm:shadcn@latest add @newtui/theme-newtvlx shadcn@latest add @newtui/theme-newtvp dlx shadcn@latest add @newtui/theme-newtnubx shadcn@latest add @newtui/theme-newtnlx shadcn@latest add @newtui/theme-newtupx shadcn@latest add @newtui/theme-newt- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
npx shadcn-vue@latest add @newtui/theme-newtpnpm dlx shadcn-vue@latest add @newtui/theme-newtyarn dlx shadcn-vue@latest add @newtui/theme-newtbunx shadcn-vue@latest add @newtui/theme-newtdeno run -A npm:shadcn-vue@latest add @newtui/theme-newtvlx shadcn-vue@latest add @newtui/theme-newtvp dlx shadcn-vue@latest add @newtui/theme-newtnubx shadcn-vue@latest add @newtui/theme-newtnlx shadcn-vue@latest add @newtui/theme-newtupx shadcn-vue@latest add @newtui/theme-newt- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
Add components
Add a component by its name in the @newtui namespace. The CLI also adds the
newt/ui components it depends on, and rewrites their imports to your aliases.
npx shadcn@latest add @newtui/button @newtui/avatar-grouppnpm dlx shadcn@latest add @newtui/button @newtui/avatar-groupyarn dlx shadcn@latest add @newtui/button @newtui/avatar-groupbunx shadcn@latest add @newtui/button @newtui/avatar-groupdeno run -A npm:shadcn@latest add @newtui/button @newtui/avatar-groupvlx shadcn@latest add @newtui/button @newtui/avatar-groupvp dlx shadcn@latest add @newtui/button @newtui/avatar-groupnubx shadcn@latest add @newtui/button @newtui/avatar-groupnlx shadcn@latest add @newtui/button @newtui/avatar-groupupx shadcn@latest add @newtui/button @newtui/avatar-group- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
npx shadcn-vue@latest add @newtui/button @newtui/avatar-grouppnpm dlx shadcn-vue@latest add @newtui/button @newtui/avatar-groupyarn dlx shadcn-vue@latest add @newtui/button @newtui/avatar-groupbunx shadcn-vue@latest add @newtui/button @newtui/avatar-groupdeno run -A npm:shadcn-vue@latest add @newtui/button @newtui/avatar-groupvlx shadcn-vue@latest add @newtui/button @newtui/avatar-groupvp dlx shadcn-vue@latest add @newtui/button @newtui/avatar-groupnubx shadcn-vue@latest add @newtui/button @newtui/avatar-groupnlx shadcn-vue@latest add @newtui/button @newtui/avatar-groupupx shadcn-vue@latest add @newtui/button @newtui/avatar-group- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
Each component page shows this command too. Select shadcn in the CLI menu of its install command.
What stays the same
- The components import
cnfrom yourutilsalias.shadcn initalready wrote it. newtuiandshadcnread the samecomponents.json. You can use both CLIs in one project.