npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@spartan-ng/brain

v0.0.1-alpha.716

Published

[![npm version](https://img.shields.io/npm/v/@spartan-ng/brain.svg?style=flat-square)](https://www.npmjs.com/package/@spartan-ng/brain) [![npm downloads](https://img.shields.io/npm/dm/@spartan-ng/brain.svg?style=flat-square)](https://www.npmjs.com/package

Downloads

145,729

Readme

@spartan-ng/brain

npm version npm downloads License: MIT Discord

WebsiteDocumentationComponentsGitHub

Accessible, unstyled UI primitives for Angular. The behavior half of spartan/ui.

@spartan-ng/brain is a fully tree-shakable collection of headless Angular primitives - keyboard navigation, focus management, ARIA wiring, and state - with zero opinions about styling. Pair it with helm styles (copied into your codebase by the spartan CLI) for the full shadcn-style experience, or bring your own design system.

Inspired by Radix UI and shadcn/ui, adapted for the Angular ecosystem.

Installation

npm install @spartan-ng/brain
# or
pnpm add @spartan-ng/brain
# or
yarn add @spartan-ng/brain

For the easiest setup, use the spartan CLI - it installs the right secondary entry points and copies matching helm styles in one command:

npm install -D @spartan-ng/cli
ng g @spartan-ng/cli:init
ng g @spartan-ng/cli:ui

Usage

Every primitive lives behind a secondary entry point so you only ship what you import:

import { Component } from '@angular/core';
import { BrnAccordionImports } from '@spartan-ng/brain/accordion';

@Component({
	selector: 'app-faq',
	imports: [BrnAccordionImports],
	template: `
		<brn-accordion>
			<brn-accordion-item>
				<brn-accordion-trigger>Is it accessible?</brn-accordion-trigger>
				<brn-accordion-content>
					Yes. brain ships with keyboard navigation and full ARIA out of the box.
				</brn-accordion-content>
			</brn-accordion-item>
		</brn-accordion>
	`,
})
export class Faq {}

Each primitive exports an Imports array (e.g. BrnAccordionImports, BrnDialogImports) for one-line wiring, or you can cherry-pick individual directives and components.

Secondary Entry Points

Import from a specific entry point to keep your bundle lean:

import { BrnDialogImports } from '@spartan-ng/brain/dialog';
import { BrnSelectImports } from '@spartan-ng/brain/select';

Available entry points:

accordion, alert-dialog, autocomplete, avatar, button, calendar, checkbox, collapsible, combobox, command, core, date-time, date-time-luxon, dialog, field, forms, hover-card, input, input-otp, label, navigation-menu, popover, progress, radio-group, resizable, select, separator, sheet, slider, sonner, switch, tabs, textarea, toggle, toggle-group, tooltip.

Browse the components gallery for live demos, API docs, and styled helm examples for each primitive.

Tailwind Preset

@spartan-ng/brain ships with the shared Tailwind preset that powers the helm styles. Most users have the CLI wire this up for them, but you can also do it by hand by adding the preset to your CSS:

@import '@spartan-ng/brain/hlm-tailwind-preset.css';

spartan/ui requires Tailwind CSS v4.

Peer Dependencies

@spartan-ng/brain works with:

  • Angular >=21.0.0 <23.0.0 (core, common, forms, cdk)
  • rxjs >=6.6.0
  • clsx >=2.0.0
  • tailwindcss >=4.0.0
  • tw-animate-css >=1.0.0 (imported by the Tailwind preset)
  • luxon >=3.0.0 (optional - only required for @spartan-ng/brain/date-time-luxon)

Documentation

Community

License

MIT © goetzrobin and the spartan contributors