# @astryxdesign/core
Core UI components, theme system, and utilities for the Astryx design system. For project setup, see [Quick Start](#quick-start) below.
## Component Docs
Look up any component's full API (props, types, best practices, and theming):
```bash
node node_modules/@astryxdesign/core/docs.mjs Button # full docs for a component
node node_modules/@astryxdesign/core/docs.mjs --list # list all components
node node_modules/@astryxdesign/core/docs.mjs --list --brief # brief summaries
```
## Page Layouts
Building a full page? Start with a template rather than composing from scratch.
Templates are content-only; they compose `Layout` with header, content, and
panel slots into common page patterns (dashboards, settings, forms, detail pages).
Wrap them in your own app chrome (`AppShell`, `TopNav`, `SideNav`) to add
global navigation.
Requires `@astryxdesign/cli` (`npm install -D @astryxdesign/cli`):
```bash
npx astryx template --list # browse all page and block templates
npx astryx template dashboard # emit full page source
npx astryx template settings --skeleton # layout skeleton with spatial annotations
```
## Astryx CLI
The CLI (`@astryxdesign/cli`) provides additional tooling:
```bash
npx astryx --help # full listing of all commands
npx astryx component Button # full docs + related block templates
npx astryx docs # reference docs (principles, tokens, theming, styling)
npx astryx docs theme # theming guide (Theme, defineTheme, light/dark)
npx astryx docs tokens # spacing, color, radius, typography token reference
npx astryx init # initialize Astryx in your project
npx astryx theme build # build theme CSS for production
npx astryx swizzle Button # eject component source for customization
npx astryx upgrade --apply # run codemods to migrate between versions
npx astryx discover # discover external Astryx packages
npx astryx gap-report # report a missing capability
```
## Related Packages
| Package | Description |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [`@astryxdesign/cli`](https://github.com/facebook/astryx/tree/main/packages/cli) | CLI tooling: component docs, templates, scaffolding, codemods |
| [`@astryxdesign/theme-neutral`](https://github.com/facebook/astryx/tree/main/packages/themes/neutral) | Muted, minimal theme (Lucide icons) |
## Resources
- [Component Storybook](https://facebook.github.io/astryx/)
- [GitHub Repository](https://github.com/facebook/astryx)
---
## Quick Start
Install Astryx and a theme:
```bash
npm install @astryxdesign/core @astryxdesign/theme-neutral
```
Then pick your setup below based on your framework and styling approach.
### Next.js (simplest)
The fastest way to get started. No build plugins, no PostCSS, no Babel config — Astryx ships pre-built CSS and JS, so you import three stylesheets (order matters) and wrap your app in a theme provider.
**`src/app/globals.css`**
```css
@import '@astryxdesign/core/reset.css';
@import '@astryxdesign/core/astryx.css';
@import '@astryxdesign/theme-neutral/theme.css';
```
The import order maps to the layer cascade: `reset.css` (`@layer reset`) → `astryx.css` component styles (`@layer astryx-base`) → `theme.css` token overrides (`@layer astryx-theme`).
**`src/app/providers.tsx`**
```tsx
'use client';
import Link from 'next/link';
import {Theme} from '@astryxdesign/core/theme';
import {LinkProvider} from '@astryxdesign/core/Link';
import {neutralTheme} from '@astryxdesign/theme-neutral/built';
export function Providers({children}: {children: React.ReactNode}) {
return (