- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Dropdown Menu
- Empty
- Field
- Form Field
- Hover Card
- Icon
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Label
- Menubar
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner (Toast)
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Tooltip
CLI
Add accessible UI primitives to any Angular project with one command.
The spartan CLI is the fastest way to add components to your project. It works with both Angular CLI projects and Nx workspaces - no additional configuration required.
For each component you add, the CLI automatically installs the Brain primitive from npm and copies the Helm styles into your codebase. You choose individual components or install them all at once.
Installation
Install the spartan CLI as a dev dependency:
pnpm add -D @spartan-ng/cli
Setup Your Theme
Before adding components, configure your theme and Tailwind settings:
ng g @spartan-ng/cli:ui-theme
npx nx g @spartan-ng/cli:ui-theme
The CLI will prompt you to select your application, locate your styles entry point, choose a theme, and set your preferred border radius. This only needs to be done once.
Add Components
Add spartan/ui components to your project:
ng g @spartan-ng/cli:ui
npx nx g @spartan-ng/cli:ui
You'll be prompted to select components to add - choose individual components or all of them. The CLI takes care of the rest.
What the CLI Does
When you add a component, the CLI automatically:
- Installs the Brain primitives: Adds the
@spartan-ng/brainpackage to yourpackage.jsonif needed - Copies Helm files: Places styled component code into your project at your specified location
- Configures imports: Updates your project configuration to recognize the new components
- Creates libraries (Nx only): Optionally generates buildable libraries for better code organization
Result: Brain primitives are installed as maintained npm dependencies. Helm styles live in your codebase where you can edit them freely. No manual setup required.
Recommended Workflow
- Install tailwindcss: official Angular installation guide
- Install the CLI:
npm i -D @spartan-ng/cli - Set up your theme:
ng g @spartan-ng/cli:ui-theme - Add components as needed:
ng g @spartan-ng/cli:ui - Customize the copied Helm files to match your design system
- Ship your app with complete control over every style
On This Page