站内导读
定位:Astryx 是 Meta 内部使用八年、现已开源的设计系统,基于 React 19 与 StyleX,适合需要统一组件、主题与 AI 协作的 Web 前端项目。
核心能力
- 提供 150+ 无障碍组件、品牌级主题、暗色模式与现成模板,并附带一个 CLI,作为同一套体系交付。
- 组件内部开放,构建块直接导出;需要更深控制时用 swizzle 把组件完整源码弹出到项目自持。
- 样式不锁定,内部用 StyleX,使用方可用 className 配合 Tailwind、CSS Modules 或普通 CSS 覆盖。
- 主题即一组 CSS 自定义属性覆盖,改品牌样式不必 fork 或包裹组件源码。
适用人群:使用 React 19 及以上的前端团队与设计师;项目需自带 react、react-dom 两个 peer 依赖并已有构建流程,也适合让 AI 助手按同一套文档与 CLI 协作。
位置づけ:Astryx は Meta が社内で 8 年使い続け、オープンソース化したデザインシステムで、React 19 と StyleX を基盤にします。コンポーネント、テーマ、AI との協働を統一したい Web フロントエンドプロジェクトに向いています。
主な機能
- 150 以上のアクセシブルなコンポーネント、ブランド級のテーマ、ダークモード、既製テンプレートを備え、CLI も含めて一つの体系として提供されます。
- コンポーネントの内部は開放され、ビルディングブロックを直接エクスポートできます。より深い制御が必要な場合は swizzle でコンポーネントの完全なソースをプロジェクト側に取り出せます。
- スタイルはロックインされず、内部は StyleX ですが、利用側は className と Tailwind、CSS Modules、通常の CSS で上書きできます。
- テーマは CSS カスタムプロパティの上書きの集合であり、ブランドスタイルの変更にコンポーネントの fork やラップは不要です。
対象ユーザー:React 19 以降を使うフロントエンドチームとデザイナー。プロジェクト側で react と react-dom の peer 依存とビルド環境を用意する必要があり、AI アシスタントに同じドキュメントと CLI で協働させる使い方にも向いています。
정의: Astryx는 Meta가 내부에서 8년간 사용하다 오픈소스로 공개한 디자인 시스템으로, React 19와 StyleX를 기반으로 합니다. 컴포넌트, 테마, AI 협업을 통일하려는 웹 프론트엔드 프로젝트에 적합합니다.
핵심 기능
- 접근성을 갖춘 컴포넌트 150개 이상, 브랜드급 테마, 다크 모드, 바로 쓸 수 있는 템플릿을 제공하며 CLI까지 하나의 체계로 함께 제공됩니다.
- 컴포넌트 내부가 열려 있어 빌딩 블록을 직접 내보낼 수 있고, 더 깊은 제어가 필요하면 swizzle로 컴포넌트 전체 소스를 프로젝트 소유로 가져올 수 있습니다.
- 스타일에 묶이지 않습니다. 내부는 StyleX를 쓰지만, 사용하는 쪽에서는 className과 Tailwind, CSS Modules, 일반 CSS로 덮어쓸 수 있습니다.
- 테마는 CSS 사용자 정의 속성 덮어쓰기의 집합이라, 브랜드 스타일을 바꿀 때 컴포넌트 소스를 fork하거나 감쌀 필요가 없습니다.
대상 사용자: React 19 이상을 쓰는 프론트엔드 팀과 디자이너에게 적합합니다. 프로젝트에 react, react-dom 두 peer 의존성과 빌드 환경이 필요하며, AI 어시스턴트가 같은 문서와 CLI로 협업하게 하는 방식에도 잘 맞습니다.
What it is: Astryx is an open source design system grown inside Meta over eight years, aimed at React 19 apps that need shared components, theming and tooling usable by both people and AI agents.
Key capabilities
- 150+ accessible components, brand-level theming, dark mode and ready-made templates, shipped with a CLI as one system.
- Open internals: the building blocks are exported directly, and swizzle ejects a component's full source into your project to own.
- No styling lock-in: styles are authored in StyleX, but you can override via className with Tailwind, CSS Modules or plain CSS.
- A theme is a set of CSS custom property overrides, so a brand change needs no forking or wrapping of component source.
README · 详细文档
来源 · 查看原文

Astryx
An open source design system that's fully customizable and built for how we build now:
by people and the agents working alongside them.
Currently in Beta · Built on React 19+ and StyleX
Docs · Storybook · Sandbox · Contributing · Discord
Overview
Astryx is an open source design system that grew inside Meta over the last eight years, where it became the most-used and largest design system in the company — powering 13,000+ apps and shaped by the engineers, designers, and product teams who depend on it every day.
It ships 150+ accessible components, brand-level theming, dark mode, ready-to-ship templates, and a CLI as one cohesive system. You import pre-built CSS and use typed React components — no build plugin, no styling library to adopt — and both people and AI assistants build with the same tooling.
What makes Astryx different:
- Open internals. Components are built to be composed at any level, not locked behind a closed top-level API. The building blocks you'd reach for are exported directly, and when you need to go deeper, swizzle ejects a component's full source into your project to own.
- No styling lock-in. Astryx authors its styles with StyleX, but that's invisible to consumers. Override with
classNameusing Tailwind, CSS modules, or plain CSS — whatever your project already uses. - Customize without wrapping. A theme is a set of CSS custom property overrides, so a designer can make Astryx unmistakably theirs without forking or wrapping component source.
- Built for people and agents. The API, docs, and CLI are designed together so a person and an AI assistant build the same way, from the same reference.
Getting Started
Astryx requires React 19 or later (react and react-dom are peer dependencies of @astryxdesign/core).
Install Astryx, a theme, and its peer dependencies:
# npm
npm install @astryxdesign/core @astryxdesign/theme-neutral @stylexjs/stylex
npm install -D @astryxdesign/cli
# pnpm
pnpm add @astryxdesign/core @astryxdesign/theme-neutral @stylexjs/stylex
pnpm add -D @astryxdesign/cli
# yarn
yarn add @astryxdesign/core @astryxdesign/theme-neutral @stylexjs/stylex
yarn add -D @astryxdesign/cli
You can also install the CLI once for your computer, so astryx works in any folder and every coding agent knows Astryx; in a project, it still runs that project's own version:
npm i -g @astryxdesign/cli
Project install, global install, or both? astryx docs global/project-global-or-both compares them (both is recommended), and astryx docs global explains how global mode works.
The simplest setup is a few CSS imports plus a theme provider — no build plugin, no PostCSS or Babel config. See the @astryxdesign/core README for the full guide (Next.js, Tailwind, Vite, and CDN).
For reliable CLI access, add a script to your package.json:
"scripts": {
"astryx": "node node_modules/@astryxdesign/cli/clients/cli/bin/astryx.mjs"
}
Then use it as npm run astryx -- component --list. This avoids path errors when AI assistants or new developers invoke the CLI directly.
Packages
| Package | Description | README |
|---|---|---|
@astryxdesign/core | Components, theme system, and utilities | README |
@astryxdesign/cli | CLI tooling: component docs, templates, scaffolding, themes, and codemods | README |
@astryxdesign/build | Build plugins for StyleX source builds | README |
@astryxdesign/theme-* | Seven ready-made, fully customizable themes (neutral, butter, chocolate, matcha, stone, gothic, y2k) | README |
@astryxdesign/lab(experimental components) is used internally for Storybook and the sandbox and is not published to npm.@astryxdesign/vega(Vega/Vega-Lite chart wrapper) and@astryxdesign/charts(chart components) are published to npm only under the@canarydist-tag — there is no stable release yet.
Principles
These are the promises Astryx makes to the people building on it.
- Guidance over enforcement. Components give you capability rather than guardrails that fight you. Design opinions live in docs and examples — if you pass a value, the component renders it.
- Strong, documented conventions. Every component follows the same naming, prop, and composition rules, and every one is thoroughly documented — so once you've learned a few, the rest feel familiar, and both people and AI can predict how an unfamiliar component behaves.
- One system for humans and AI. The API, conventions, docs, and CLI are designed together so people and AI assistants build the same way. Every change that made Astryx easier for AI made it easier for people too.
- Earned by measurement. We test conventions rather than assert them, hold the results loosely, and revisit them when a new situation proves them wrong.
Architecture
Foundations
The building blocks for visually cohesive and accessible interfaces: typography, color, layout, and accessibility.
Components
A library of 150+ reusable UI building blocks with full TypeScript support.
Patterns
Battle-tested design solutions for common interactions and workflows: table pages, detail page layouts, form wizards, navigation patterns, data entry flows.
Project Structure
| Directory | Purpose |
|---|---|
apps/ | Example apps, the docsite, and Storybook |
packages/ | Published packages: core, cli, build, themes |
internal/ | Internal tooling: test utilities, eslint plugin, vibe tests |
Contributing
We welcome contributions! See CONTRIBUTING.md for the full guide.
Questions, or want a hand with a PR? Come find us in Discord.
Our conventions and review rubrics live in the Contributing wiki — including API Conventions, Design Conventions, the Component Lifecycle, the Contributing Templates, and the Blog Review Rubric. Read the relevant rubric before opening a PR.
Quick start for contributors: this repo uses Node 22+ on an active LTS line and pnpm 11. Install pnpm directly, or enable Corepack once so the pinned pnpm version installs automatically:
corepack enable
pnpm install
If corepack is missing, install pnpm directly or install Corepack manually; see the troubleshooting notes in CONTRIBUTING.md.
The Theme Showcase DOM tests use the root ui project for shared DOM and StyleX test setup. Run pnpm exec vitest run --project ui apps/docsite/src/__tests__/theme-showcase/ from the repository root.
License
MIT