Skip to content

Meta Astryx: An Open-Source React Design System Built for AI Agents

AINewss Editorial Team Updated

Meta Astryx is a MIT-licensed React design system that Meta open-sourced on June 18, 2026, shipping 150+ accessible components, 7 themes, a structured-output CLI, a hosted MCP server, and AGENTS.md/CLAUDE.md context generation so AI coding agents can use it directly. It requires React 19+, still ships charting packages as @canary only, and swizzling a component moves it permanently off the upstream upgrade path.

View 16 references
0 views 0 likes

Allow the functional cookie to save your likes. Privacy details

What Meta Astryx Is

Meta open-sourced Astryx on June 18, 2026 under the MIT license, and the repository is explicitly marked "Currently in Beta" (GitHub). It is not a straight export of Meta's internal component library. The official technical post How Astryx works explains that the internal system was rebuilt on open-source foundations — TypeScript, StyleX, and modern browser features — and then extended so that humans and AI agents read the same documentation.

Component counts differ by source, and the gap matters when you evaluate the library. The repository README advertises 150+ accessible components, while the component block on the official site is headed "Over 180 components". The two figures are not necessarily contradictory — READMEs routinely lag behind live sites — but the number to trust during technical selection is whatever astryx component --list prints from the version you actually install.

Source Stated component count
Repository README 150+ accessible components
Official homepage component block Over 180 components

Two other numbers are vendor self-reported and cannot be independently verified outside Meta: both the README and the homepage state that Astryx "grew inside Meta over the last eight years" and is "powering 13,000+ apps". Third-party coverage such as Zendot repeats the same official wording.

The stack is React 19+ with StyleX, full TypeScript typing, Storybook for component preview, and Vitest plus Playwright for testing. All packages publish to npm under the @astryxdesign scope, with the release status of each recorded in the npm registry metadata for @astryxdesign/core:

Package Purpose Release status
@astryxdesign/core Components and the theme system Stable
@astryxdesign/cli Command-line tooling Stable
@astryxdesign/build StyleX source build plugin Stable
@astryxdesign/richtext Rich text editor Stable
@astryxdesign/vega Chart components @canary only — no stable release
@astryxdesign/charts Chart components @canary only — no stable release
@astryxdesign/lab Experimental components Canary and bootstrap tags only; the README describes it as for internal Storybook and sandbox use

Installation and Minimum Setup

Astryx requires React 19 or newer: react and react-dom are peer dependencies of @astryxdesign/core at >=19.0.0. Install the core package, StyleX, and a theme:

npm install @astryxdesign/core @stylexjs/stylex @astryxdesign/theme-neutral
npm install -D @astryxdesign/cli

Global styling needs exactly two CSS imports — no build plugin, no PostCSS, no Babel configuration:

@import '@astryxdesign/core/reset.css';
@import '@astryxdesign/core/astryx.css';

Wrap the application root in the theme provider:

import {Theme} from '@astryxdesign/core/theme';
import {themes, defaultThemeSlug} from './astryx-themes';

<Theme theme={themes[defaultThemeSlug]}>
  <App />
</Theme>

Components are imported from their own subpath rather than from the package root:

import {Button} from '@astryxdesign/core/Button';

Complete setups for Next.js, Vite, Tailwind, and CDN delivery live in the official Getting Started guide. Contributing to the repository requires Node 22+ (an active LTS line) and pnpm 11; the published CLI package declares engines: node >=22.13.0 in its npm registry metadata.

Built for AI Agents

This is where Astryx separates itself from nearly every other component library. The official launch post Introducing Astryx says the system was "built ground-up to be AI-operable" rather than retrofitted to accommodate agent behaviour. Four capabilities follow from that.

CLI: structured output, not just human-facing docs

@astryxdesign/cli provides component documentation, templates, scaffolding, themes, and codemods. Every command accepts --json and returns a typed envelope carrying an apiVersion, alongside stable error codes such as ERR_UNKNOWN_COMPONENT — agent code should branch on the code, not on the error message text. --dense produces a compact, token-saving format, --detail brief|compact|full controls verbosity, and --zh outputs Chinese. The full command list and response types are documented in the CLI reference.

Meta's recommended workflow for agents is three commands:

npx @astryxdesign/cli build "<your idea>"      # find the closest page template
npx @astryxdesign/cli template <name> <path>   # write the template into the project
npx @astryxdesign/cli component <Name>         # read a component's real props

AGENTS.md and CLAUDE.md: specifications in the files agents read

npx @astryxdesign/cli init --features agents writes context files into the project root — AGENTS.md by default, and CLAUDE.md as well for Claude Code setups. The generated content includes a component index, behavioural rules (no bare div, no style={{}}, no magic values), and a CLI cheat sheet. Astryx maintains only the blocks it has marked itself, leaving the rest of your file untouched.

The hosted MCP server

Meta hosts a remote MCP server at astryx.atmeta.com/mcp exposing two tools: search(query) retrieves components, documentation topics, and page templates, while get(name) returns complete documentation including props, usage, and examples. The endpoint currently reports serverInfo: astryx 2.0.0, and tools/list returns exactly search and get — nothing else.

Transport configuration differs per client, and the Working with AI guide flags a sharp edge: when the transport type is wrong, clients typically "skip that entry and show a warning" instead of erroring, so the session looks connected while no tools are actually available.

Client Transport entry to use
Claude Code "type": "http"
Cline "streamableHttp"
Cursor (remote entry) no type field at all
{
  "mcpServers": {
    "astryx": {
      "type": "http",
      "url": "https://astryx.atmeta.com/mcp"
    }
  }
}

The site root also publishes llms.txt, a condensed index of the whole site formatted for large language models.

Swizzle: taking component source into your project

The official blog describes a five-step path of increasing control: use the component as shipped → adjust theme tokens → add a className → write your own CSS → take the source entirely. swizzle is the last step:

npx @astryxdesign/cli swizzle Button

It copies the component's complete source, internal modules included, into your repository, and from that point you own it. How Astryx works puts it plainly: the first four levels remain on the shared upgrade path, while swizzle is a one-way door — that component is permanently detached from upstream updates.

One pitfall is documented under Styling components: precompiled components need no compiler, but swizzled components are StyleX source and require the StyleX compiler in your build. Without it, imports throw an error beginning Unexpected 'stylex.create' call at runtime and the page fails to render.

Themes and Style Overrides

Astryx ships seven themes — neutral, butter, chocolate, matcha, stone, gothic, and y2k — published as @astryxdesign/theme-<name> packages. A theme is essentially a set of CSS custom property overrides, so swapping skins requires no fork and no component wrapper.

Styling stays open as well. The Styling components guide gives the priority order: xstyle (compile-time StyleX) → Tailwind utility classes → className / style. With the precompiled CSS, overriding via Tailwind, CSS Modules, or plain CSS all work without an extra build plugin, and the repository includes a Tailwind v4 theme bridge for token mapping.

One detail is easy to miss: Astryx stylesheets sit inside cascade layers (@layer reset, @layer astryx-base). Layers ignore specificity, so if your project already has global CSS, a legacy reset, or Tailwind, you must declare the layer order explicitly — otherwise unlayered styles will override Astryx.

When Astryx Is the Wrong Choice

  • React below version 19. react and react-dom must be >=19.0.0; this is a hard peer-dependency constraint.
  • Non-React stacks. Astryx is a React component library, so Vue, Svelte, and vanilla implementations cannot use it.
  • Production systems that need a stable API. The project is in Beta and the 0.x API can still change. The release cadence is dense: v0.7.14 shipped on 2026-11-11, v0.7.15 on 2026-11-12, and v0.7.16 on 2026-11-14 (see Releases). The chart packages remain @canary only.
  • Teams that do not want to maintain component source. After a swizzle, upgrades and bug fixes are yours.
  • Products sensitive to Safari tooltip detail. The v0.7.15 release notes list a known issue: under Safari/WebKit's default animation settings, a taller tooltip briefly covers its trigger element on the first frame of first appearance (interaction is unaffected). Meta states it is fixed in v0.7.16.

Quick-Start Checklist

  1. Confirm the project runs React 19 or later.
  2. Install core, StyleX, and the neutral theme, plus the CLI as a dev dependency.
  3. Add the two global CSS imports (reset.css and astryx.css).
  4. Run npx @astryxdesign/cli init to generate theme wiring and agent context files.
  5. Run npx @astryxdesign/cli theme list, then theme add <slug> to install your chosen theme.
  6. Wrap the root in <Theme theme={themes[defaultThemeSlug]}>.
  7. Import components from their subpaths, for example @astryxdesign/core/Button.
  8. Run npx @astryxdesign/cli doctor for an environment self-check — its exit code works directly in CI.
  9. To bring AI agents into development, register the MCP server and run init --features agents.
  10. Swizzle only when you truly need to change a component's internals, and wire the StyleX compiler into your build when you do.

References

  1. Astryx — An open source design system that's fully customizable and agent ready (GitHub README)github.com
  2. Astryx Design System — 官方文档站首页astryx.atmeta.com
  3. Getting Started · Astryxastryx.atmeta.com
  4. Working with AI · Astryx(agent docs 与 MCP 服务器配置)astryx.atmeta.com
  5. Styling components · Astryx(样式覆盖与 swizzle 的 StyleX 编译器要求)astryx.atmeta.com
  6. CLI Reference · Astryx(命令清单与 JSON 响应信封)astryx.atmeta.com
  7. How Astryx works · Astryx 官方技术博客astryx.atmeta.com
  8. Introducing Astryx by Meta: an open source design system built for how we build nowastryx.atmeta.com
  9. Astryx v0.7.16 Release(Safari tooltip 修复)github.com
  10. Astryx v0.7.15 Release(Known issue: Safari/WebKit tooltip 遮挡)github.com
  11. Releases · meta/astryx(版本发布节奏)github.com
  12. Meta open-sources Astryx, the design system behind 13,000+ internal apps · Zendotzendot.org
  13. llms.txt — Astryx 官方文档站(供大模型读取的站点索引)astryx.atmeta.com
  14. Astryx MCP Server(托管端点,serverInfo: astryx 2.0.0,tools: search / get)astryx.atmeta.com
  15. npm registry 元数据:@astryxdesign/cli(engines: node >=22.13.0)registry.npmjs.org
  16. npm registry 元数据:@astryxdesign/core(peerDependencies: react/react-dom >=19.0.0)registry.npmjs.org