@voltui/cli copies Volt UI component source into your Angular project, similar to shadcn/ui.
Volt UI is an independent Angular project and is not related to PrimeVue Volt UI.
The CLI workflow is the recommended way to use Volt UI components. Copied files become code in your app. You can edit them, delete variants, add styles, or change behavior without waiting on the library package.
The npm package @voltui/components is mainly for themes, utilities, and advanced direct package consumption.
npx @voltui/cli init
npx @voltui/cli add buttonDuring local development in this repo:
node cli/bin/volt add buttonvolt init [target-dir]Creates the target UI directory and an index.ts barrel.
Default target:
./src/app/ui
Example:
volt init ./src/app/shared/uivolt add <component-name>... [target-dir] [--install] [--dry-run] [--force]Examples:
volt add button
volt add button card input
volt add card ./src/app/shared/ui
volt add dialog ./src/app/shared/ui --dry-run
volt add button --install
volt add button --forceFlags:
| Flag | Description |
|---|---|
target-dir |
Optional destination directory. Defaults to ./src/app/ui. |
--install |
Installs runtime dependencies in the current working directory. |
--dry-run |
Prints the files that would be copied without writing files or installing packages. |
--force |
Allows overwriting existing component files. Without this flag, the CLI refuses to overwrite. |
Runtime dependencies installed by --install:
ng-primitives class-variance-authority clsx tailwind-mergevolt listPrints component names from public/manifest.json.
When you run volt add button:
- Source files are read from
projects/volt/src/lib/components/button/. - Selectors are transformed from
volt-*toui-*. - Class and identifier names are transformed from
Volt*/volt*toUi*/ui*. - Local component dependencies from the manifest are copied too.
- The target
index.tsbarrel is updated. - Existing files are protected unless you pass
--force.
The CLI reports unknown components clearly. Run volt list if a component name fails.
import { UiButton } from './ui/button';
@Component({
selector: 'app-my-component',
imports: [UiButton],
template: `<ui-button variant="solid">Click me</ui-button>`,
})
export class MyComponent {}See COMPONENT_STATUS.md for the current component list and maturity status.
- Copied components are yours to maintain.
- Re-running
volt addover an edited component requires--force; review the diff before doing that. - Prefer
--dry-runwhen adding beta or dependency-heavy components. - Regenerate the manifest with
pnpm manifestafter changing component source in this repo.