
Angular Best Practices Spartan
- 229 installs
- 37 repo stars
- Updated March 28, 2026
- alfredoperez/angular-best-practices
Build Angular UIs with Spartan-ng headless primitives, accessible patterns, and consistent component architecture for production SaaS or extension frontends.
About
angular-best-practices-spartan teaches Claude Spartan-ng conventions for Angular: headless accessible primitives, standalone components, theming, and composable UI structure. Use it when scaffolding or refactoring Angular frontends that should follow modern Spartan design-system patterns instead of ad hoc markup.
- Spartan-ng headless UI patterns
- Angular standalone component conventions
- Accessible composable primitives
- Consistent theming and layout structure
- Production-ready component architecture
Angular Best Practices Spartan by the numbers
- 229 all-time installs (skills.sh)
- Ranked #820 of 2,245 Frontend Development skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/alfredoperez/angular-best-practices --skill angular-best-practices-spartanAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 229 |
|---|---|
| repo stars | ★ 37 |
| Last updated | March 28, 2026 |
| Repository | alfredoperez/angular-best-practices ↗ |
What it does
Build Angular UIs with Spartan-ng headless primitives, accessible patterns, and consistent component architecture for production SaaS or extension frontends.
Files
Angular Spartan UI Best Practices
Spartan UI rules for headless components with Brain (behavior) and Helm (styling). Use with the core angular-best-practices skill for comprehensive Angular coverage.
Links
When to Apply
- Adding Spartan Brain directives for accessible behavior
- Styling components with Helm and Tailwind CSS
- Building dialogs, tabs, menus, or accordions with Spartan primitives
Rules
| Rule | Impact | Description |
|---|---|---|
| Configure Tailwind with Spartan Helm | MEDIUM | Consistent utility-first styling via hlm directives |
| Use Spartan Brain for Accessible Behavior | MEDIUM | WCAG-compliant ARIA, keyboard nav, and focus management |
| Use Spartan UI Headless Components | MEDIUM | Full styling control with built-in accessibility |
Install
Install from skills.sh/alfredoperez/angular-best-practices:
- Core skill: angular-best-practices
- This add-on: angular-best-practices-spartan
Angular Spartan Best Practices
Use with the core angular-best-practices skill.---
1. Spartan UI
Impact: MEDIUM (Headless UI)
1.1 Configure Tailwind with Spartan Helm
Impact: MEDIUM (Consistent utility-first styling)
Use Spartan Helm components with Tailwind CSS. Configure the hlm plugin in tailwind.config.js. Use hlmInput, hlmBtn, hlmCard directives to apply consistent Tailwind-based styles.
Incorrect:
<!-- Manual Tailwind classes — inconsistent, no design system -->
<button class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600">Save</button>Correct:
<button hlmBtn variant="default">Save</button>
<button hlmBtn variant="outline" size="sm">Cancel</button>1.2 Use Spartan Brain for Accessible Behavior
Impact: MEDIUM (WCAG-compliant interactions for free)
Spartan Brain directives handle ARIA attributes, keyboard navigation, and focus management automatically. Use Brain primitives (brnAccordion, brnMenu, brnTabs) instead of building custom a11y logic.
Incorrect:
// Custom tabs — missing aria-selected, arrow key navigation, focus management
@Component({ template: '@for (t of tabs; track t.id) { <div (click)="select(t)">{{t.label}}</div> }' })Correct:
<brn-tabs defaultValue="tab1">
<brn-tabs-list hlmTabsList>
<button brnTabsTrigger="tab1" hlmTabsTrigger>Tab 1</button>
</brn-tabs-list>
</brn-tabs>1.3 Use Spartan UI Headless Components
Impact: MEDIUM (Full styling control with a11y built-in)
Use Spartan's Brain (headless) directives for behavior and accessibility, paired with Helm (styled) components for UI. Install only the primitives you need via @spartan-ng/brain/*.
Incorrect:
// Building custom dialog from scratch — missing a11y, focus trap, esc handling
@Component({ template: '<div class="overlay"><div class="panel">...</div></div>' })Correct:
<brn-dialog>
<brn-dialog-trigger><button hlmBtn>Open</button></brn-dialog-trigger>
<brn-dialog-content hlmDialogContent>Content here</brn-dialog-content>
</brn-dialog>---