Meta released Astryx this week. It is an open-source design system, currently in Beta. The project grew inside Meta’s monorepo over eight years. Astryx is built on React and StyleX. StyleX is Meta’s compile-time CSS engine.
TL;DR
Astryx is Meta’s open-source, agent-ready React design system, now in Beta.
It pairs StyleX styling with a CSS-variable theme cascade and ten themes.
A CLI and MCP server lets AI agents scaffold and document UIs.
It is production-tested inside Meta but young as a public project.
What is Astryx
Astryx is a component library and a system around it. It provides foundations, components, templates, and themes. Foundations cover typography, color, layout, and accessibility. The official repository documents more than 90 React components. Meta’s docs site counts over 150. Components ship with built-in spacing, dark mode, and flexible styling. Templates compose full pages like dashboards, settings, and forms. The license is MIT. TypeScript makes up about three-quarters of the codebase.
The styling layer is worth understanding. StyleX compiles styles to static, atomic CSS at build time. Meta open-sourced StyleX at the end of 2023. It powers Facebook, Instagram, WhatsApp, and Threads. External companies like Figma and Snowflake also use it.
Two design choices stand out. First, internals are open. All primitives are exported and composable, not hidden. You can compose at any level. Second, spacing is automatic. Astryx calls this context-aware spacing compensation. It eliminates ‘double padding’ issues without manual fixups.
The ‘Agent Ready’ Part
This is the main difference from other design systems. Astryx ships docs and tooling that AI agents can read. Components carry JSDoc annotations with composition hints. A CLI exposes the same API a developer uses. There is also an MCP server. MCP is the Model Context Protocol. Agents use it to scaffold, browse, and document.
The CLI is called via astryx or the shorthand xds. One feature is really important for automation. The CLI returns a self-describing manifest as JSON. It lists every command, argument, flag, and response type. Compareing it to an OpenAPI spec for the CLI. So an agent need not scrape --help text. It reads one structured payload instead.
npx astryx component Button # full docs for a component
npx astryx template dashboard # emit full page source
npx astryx manifest --json # machine-readable command spec
Themes and the CSS-Variable Cascade
Astryx ships ten ready-made themes. They are named default, neutral, daily, butter, chocolate, matcha, stone, gothic, brutalist, and y2k. All are fully customizable. Theming uses a CSS variable cascade. You change the variables, and every component restyles. Component code stays untouched.
The interactive demo below shows this directly. Pick a theme and watch the tokens update live.
Astryx · interactive explainer
01 · OVERVIEW
What Astryx is
An open-source React design system from Meta — foundations, components, templates, and themes. Built on React and StyleX, Meta’s compile-time CSS engine. It ships pre-built CSS, so no build plugin is required. Currently in Beta.
NoteThe GitHub repo states “over 90 components”; Meta’s docs site counts 150+. Both come from official Astryx sources.
02 · THEMING
The CSS-variable cascade
Themes are a cascade of CSS variables (tokens). Change the variables and every component restyles — component code never changes. Pick a theme:
Badge
A
Astryx Card
tokens drive every style
Active tokens
IllustrativeThe cascade mechanism is exactly how Astryx themes work; per-theme token values are representative.
03 · LAYOUT
Automatic spacing — the “double padding” fix
Nest a padded box in another and the gaps stack; you normally strip padding by hand. Astryx’s context-aware spacing compensation keeps the edge gap consistent. Toggle it — the gap is measured from the rendered DOM.
Compensation: ON
Content
Measured edge gap
16px
IllustrativeThe gap is read from the real DOM. The rule here stands in for Astryx’s internal logic.
04 · ARCHITECTURE
Open internals you can compose and eject
Astryx exports its primitives instead of hiding them, so you compose at any level. When a component is close but not exact, eject its source with the CLI and edit it directly.
# get the real component source to edit in your repo
$ npx astryx swizzle Button
# then import your local copy instead of the packageimport {Button} from'./components/Button';
Ejected source is yours to change. Astryx stays the default; you own only what you customize.
05 · AGENT READY
A CLI and MCP server agents can read
The CLI exposes the same API a developer uses, plus an MCP server. One call returns a self-describing JSON manifest, so an agent reads structured commands instead of scraping help. Click a command:
astryx · CLI (alias: xds)
RepresentativeCommand names and the manifest shape match the Astryx CLI README (v0.0.14). Output is shortened for display.
06 · SETUP
Install and ship
Simplest path: Next.js + Tailwind. Astryx ships pre-built CSS, so no build plugin is needed.
# install core, a theme, and the CLI
npm install @astryxdesign/core @astryxdesign/theme-neutral
npm install -D @astryxdesign/cli
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Want top-tier web hosting, cloud hosting, VPS servers, or a professional business email at a discount? 🙌 Sign up with Hostinger using my referral link and get 20% OFF your purchase!
Hostinger offers fast, reliable, and scalable solutions for all your projects—whether you’re launching a website, running a business, or need powerful KVM-based servers. Plus, their 24/7 support and easy-to-use tools make everything a breeze. 🚀