radix-ng/primitives
Sobre
Headless, signals-first UI primitives for Angular. Accessible. Customizable.
Desenvolvimento web e de aplicativosO que você pode fazer
- 🎯 Headless — your design system supplies the visual styles.
- ♿ Accessible — built to the WAI-ARIA authoring practices, with keyboard navigation and focus management.
- ⚡ Signals-first — modern Angular API (input(), model(), computed(), signal()).
- 📝 Angular-native forms — shared Field labels, descriptions, and errors across supported form APIs.
Crescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- 0
- em 15 dias
- 0
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalRadix NG
Headless, signals-first UI primitives for Angular.
Use Angular directives to add keyboard interaction and focus management to your own markup. Style
the documented data-* states with CSS or Tailwind, and connect supported controls to Angular Forms.
Browse the live examples and API reference.
The library grew out of an Angular port of Radix UI. Base UI is the primary reference for component APIs and behavior.
Features
- 🎯 Headless — your design system supplies the visual styles.
- ♿ Accessible — built to the WAI-ARIA authoring practices, with keyboard navigation and focus management.
- ⚡ Signals-first — modern Angular API (
input(),model(),computed(),signal()). - 📝 Angular-native forms — shared Field labels, descriptions, and errors across supported form APIs.
- 🧩 Composable — primitives compose via
hostDirectivesand shared building blocks. - 🌗 Theme-ready — state-driven styling works with light/dark and any design tokens.
- 📦 Tree-shakeable — granular secondary entry points (
@radix-ng/primitives/<name>). - 🤖 AI-ready — installable Skills teach AI coding assistants the APIs, examples, and
data-*styling contract.
Installation
ng add @radix-ng/primitives
The schematic installs the runtime peer dependencies and can add AI assistant instructions
(AGENTS.md / CLAUDE.md) to your workspace. Or install manually:
npm install @radix-ng/primitives @floating-ui/dom @internationalized/date @internationalized/number
Quick start
import { Component } from '@angular/core';
import {
RdxCollapsibleRootDirective,
RdxCollapsibleTriggerDirective,
RdxCollapsiblePanelDirective
} from '@radix-ng/primitives/collapsible';
@Component({
selector: 'app-demo',
imports: [RdxCollapsibleRootDirective, RdxCollapsibleTriggerDirective, RdxCollapsiblePanelDirective],
template: `
<div rdxCollapsibleRoot>
<button rdxCollapsibleTrigger>Toggle</button>
<div rdxCollapsiblePanel>Content</div>
</div>
`
})
export class DemoComponent {}
Use [data-open] and [data-closed] to style the Collapsible panel.
Angular Forms
Inside an rdxFieldRoot, use rdxNgControlField with a Reactive Forms or ngModel control.
For Signal Forms, apply rdxSignalField from @radix-ng/primitives/signal-forms alongside
[formField]. These adapters expose Angular's validation and interaction state to the Field parts.
Support varies by control. Reactive Forms and ngModel use native inputs or primitives with a
ControlValueAccessor. Signal Forms is stable in Angular 22. Date Field, Time Field, and Editable
use model() for Signal Forms. See the
control integration matrix,
complete form examples,
and the migration guide for
upgrades from 1.0.10.
Documentation
- 📖 Storybook — component guides, live examples, and API reference
- 📄 LLM documentation index and full reference
- 🧩 Component Markdown at
https://radix-ng.com/docs/components/<name>.md - 🤖 AI assistant skills — for Claude Code, Cursor, Copilot, and others
- 🎙 The Story of My Radix UI Port for Angular — talk, FrontendConf Moscow 2025
AI assistant skills
Give your AI coding assistant structured knowledge of the primitives — the machine-readable API
contract (selectors, inputs/outputs, two-way bindings), working examples, the data-* styling
contract, and a list of common mistakes — so it writes correct, accessible code instead of
guessing. The Skills are self-contained (everything bundled offline) and work with
Claude Code, Cursor, Codex, Cline, Windsurf, GitHub Copilot, Gemini, and other agents via the open
Agent Skills ecosystem.
npx skills add radix-ng/primitives/skills
Roadmap
Planned, not yet available:
- Date Picker
- Date Range Field
- Date Range Picker
- Range Calendar
Want something else? Open an issue or start a discussion.
Ecosystem
- OriginUI for Angular — styled components built on these primitives
- shadcn/ui for Angular — shadcn-style components
- DataGrid — built with TanStack Table
Contributing
For agent-assisted development, start with AGENTS.md and the engineering map.
Contributor skills live in .agents/skills/; skills/ contains the separately distributed consumer bundle.
Contributions are welcome! The repository is an Nx monorepo:
.
├── apps
│ ├── radix-storybook Storybook docs and examples
│ ├── radix-playground Angular playground app
│ ├── radix-ssr-testing SSR smoke-test app
│ ├── radix-perf-testing performance benchmarks
│ └── visual-regression Playwright visual and behavior specs
└── packages
└── primitives headless primitives (no styling)
Use the Node version in .nvmrc and the pnpm version in package.json.
pnpm install
pnpm primitives:test # run tests
pnpm primitives:build # build the library
pnpm storybook:primitives # start Storybook
pnpm playground # start the playground app
pnpm test-visual # build Storybook and run Playwright visual checks
Community
We're excited to see the community adopt Radix NG, raise issues, and provide feedback — whether it's a feature request, bug report, or a project to showcase.
Contributor analytics
License
This project is licensed under the terms of the MIT license.
Explore projetos relacionados
Carregando…