This week, Meta introduced Astryx to the world. It’s an open-source design system that’s currently in Beta. The project started life inside Meta’s monorepo, where it matured over the course of eight years. Under the hood, it relies on React and StyleX — Meta’s compile-time CSS engine.
TL;DR
Astryx is Meta’s open-source React design system built for AI agents, currently in Beta.
It combines StyleX-based styling with a CSS-variable theming system that includes ten built-in themes.
A dedicated CLI and MCP server enable AI agents to scaffold and document user interfaces.
It’s battle-tested across Meta’s products, though it’s still early days as an open-source project.
What is Astryx
Astryx serves as both a component library and the broader ecosystem around it. It delivers design foundations, individual components, pre-built templates, and themes. The foundations include typography, color systems, layout helpers, and accessibility primitives. The official GitHub repository documents upwards of 90 React components. Meanwhile, Meta’s own documentation site references more than 150 components. Each component comes with built-in spacing logic, dark mode support, and flexible styling options. Templates let you compose entire pages — things like dashboards, settings screens, and forms. The project is licensed under MIT. Roughly seventy-five percent of the codebase is written in TypeScript.
The styling setup deserves a closer look. StyleX compiles styles to static atomic CSS during the build process. Meta open-sourced StyleX in late 2023. It’s the engine behind Facebook, Instagram, WhatsApp, and Threads. Outside of Meta, companies like Figma and Snowflake have adopted it as well.
Two design decisions set it apart. First, its internals are fully exposed — every primitive is exported and freely composable rather than tucked away behind abstractions. You can build and recombine at whatever level suits you. Second, spacing is handled automatically. Astryx refers to this as “context-aware spacing compensation.” It resolves those annoying “double padding” problems without requiring manual overrides.
The ‘Agent Ready’ Part
This is what truly differentiates Astryx from other design systems. It ships documentation and tooling designed for AI agents to consume. Each component carries JSDoc annotations filled with composition guidance. A CLI mirrors the same API a developer would use. And there’s an MCP server as well — MCP being the Model Context Protocol, the standard through which agents perform scaffolding, browsing, and documentation tasks.
The CLI can be invoked via astryx or its shorthand alias xds. One feature stands out as especially valuable for automation: the CLI returns a self-describing JSON manifest that enumerates every command, argument, flag, and response type. Think of it as something akin to an OpenAPI spec but for the CLI. That means agents don’t have to parse --help output by scraping text — they get a single structured payload to work with 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 comes packaged with ten ready-to-use themes. They go by the names default, neutral, daily, butter, chocolate, matcha, stone, gothic, brutalist, and y2k. Every one of them can be customized without restriction. Theming operates through a cascade of CSS variables. You swap the variable values and every connected component restyles itself instantly — no component source code needs to be touched.
The interactive demonstration below illustrates this concept in real time. Choose a theme and watch the design tokens refresh on the fly.
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. Ships with pre-built CSS so no build plugin is needed. Currently in Beta.
8 yrsdeveloped inside Meta
13,000+apps powered by it
150+components (docs site)
10pre-built themes
NoteThe GitHub repository lists “over 90 components”; Meta’s documentation site references 150+. Both figures come from official Astryx sources.
02 · THEMING
The CSS-variable cascade
Themes are structured as a cascade of CSS variables (tokens). Adjust the variables and every component automatically restyles — the component code itself never changes. Choose a theme:
Badge
A
Astryx Card
tokens drive every style
IllustrativeThe cascade mechanism precisely mirrors how Astryx themes operate; per-theme token values shown here are representative.
03 · LAYOUT
Automatic spacing — the “double padding” fix
Nest a padded element inside another padded element and the gaps accumulate — normally you’d strip padding by hand. Astryx’s context-aware spacing compensation maintains a consistent edge gap. Toggle it on and off — the gap is measured directly from the rendered DOM.
IllustrativeThe gap is sourced from the live DOM. The rule here serves as a stand-in for Astryx’s internal logic.
04 · ARCHITECTURE
Open internals you can compose and eject
Astryx exposes its primitives rather than concealing them, giving you the freedom to compose at any abstraction level. When a component nearly fits but doesn’t quite, use the CLI to eject its source code and edit it directly.
The easiest way to begin is with Next.js and Tailwind. Astryx comes with pre-built CSS, so there's no need for any build plugins. Just install the core package and a theme.
Wrap your application with the Theme provider.
'use client';
import type {ReactNode} from 'react';
import {Theme} from '@astryxdesign/core/theme';
import {neutralTheme} from '@astryxdesign/theme-neutral/built';
export function Providers({children}: {children: ReactNode}) {
return {children};
}
Then start using components right away.
import {Button} from '@astryxdesign/core/Button';
export default function Page() {
return ;
}
A Tailwind bridge maps design tokens to utility classes. This means bg-surface resolves to a system token under the hood, saving you from writing repetitive var(--...) classes. A Vite setup and a StyleX-only approach are also documented.
Use Cases With Examples
Internal dashboards are an ideal use case. You can quickly build evaluation or monitoring views. Astryx supplies dashboard, table, and detail templates out of the box. A Vega/Vega-Lite chart wrapper takes care of plotting needs.
AI agent-built interfaces are another strong fit. An AI coding assistant can scaffold a settings page by invoking the CLI, consulting the agent-ready documentation, and then composing the necessary components. The MCP server turns this into a structured workflow rather than trial and error.
Multi-brand products are the third scenario. A single component set can serve multiple brands. You switch themes through the variable cascade, with no need to rewrite any components.
How Astryx Compares
Dimension
Astryx (Meta)
shadcn/ui
MUI (Material UI)
Styling engine
StyleX, compile-time atomic CSS
Tailwind CSS + Radix primitives
Emotion runtime (CSS-vars mode available)
Theming
CSS-variable cascade, 10 themes
CSS variables you edit directly
Theme object via provider
Components
90+ (docs site lists 150+)
Copy-paste set you own
Large component suite
Agent tooling
CLI + MCP server + JSON manifest
CLI to add components
None built in
Code ownership
Composable; swizzle to eject source
You own copied source
Library dependency
License
MIT
MIT
MIT (core)
Maturity
Beta public; 8 years internal
Widely adopted
Mature, widely adopted
shadcn/ui is the closest familiar comparison. Both emphasize composition and CLI scaffolding. Astryx sets itself apart with its StyleX engine and MCP tooling. These competitor details are summarized and will evolve over time.
Strengths and Weaknesses
Strengths:
Compile-time StyleX styling, battle-tested at Meta scale
Open, composable primitives available at every layer
Ten customizable themes driven by a CSS variable cascade
A CLI and MCP server give AI agents a genuine API to work with
Automatic spacing eliminates common layout bugs
MIT licensed with support for Next.js, Vite, and Tailwind
Weaknesses:
Beta status means APIs and versions may shift
The CLI is still early, currently at version 0.0.14
StyleX carries a steeper learning curve than Tailwind
Component counts differ between the repository and the docs site
Adoption beyond Meta remains unproven
Check out the Repo and Project page. Also, feel free to follow us on Twitter and don't forget to join our 150k+ ML SubReddit and subscribe to our Newsletter. Wait — are you on Telegram? Now you can join us on Telegram as well.
Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us