Meta’s Astryx Brings a CLI and MCP Server to an Open-Source React Design System Agents Can Read
Meta launched Astryx this week. It is an open-source design system, at the moment in Beta. The challenge grew inside Meta’s monorepo over eight years. Astryx is constructed 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 brokers scaffold and doc UIs.
- It is production-tested inside Meta however younger as a public challenge.
What is Astryx
Astryx is a part library and a system round it. It supplies foundations, parts, templates, and themes. Foundations cowl typography, coloration, structure, and accessibility. The official repository paperwork greater than 90 React parts. Meta’s docs web site counts over 150. Components ship with built-in spacing, darkish mode, and versatile styling. Templates compose full pages like dashboards, settings, and varieties. The license is MIT. TypeScript makes up about three-quarters of the codebase.
The styling layer is price understanding. StyleX compiles kinds to static, atomic CSS at construct time. Meta open-sourced StyleX on the finish of 2023. It powers Facebook, Instagram, WhatsApp, and Threads. External corporations like Figma and Snowflake additionally use it.
Two design decisions stand out. First, internals are open. All primitives are exported and composable, not hidden. You can compose at any stage. Second, spacing is automated. Astryx calls this context-aware spacing compensation. It eliminates ‘double padding’ points with out handbook fixups.
The ‘Agent Ready’ Part
This is the primary distinction from different design programs. Astryx ships docs and tooling that AI brokers can learn. Components carry JSDoc annotations with composition hints. A CLI exposes the identical API a developer makes use of. There can also be an MCP server. MCP is the Model Context Protocol. Agents use it to scaffold, browse, and doc.
The CLI is named through astryx or the shorthand xds. One characteristic is absolutely necessary for automation. The CLI returns a self-describing manifest as JSON. It lists each command, argument, flag, and response sort. Compareing it to an OpenAPI spec for the CLI. So an agent needn’t scrape --help textual content. It reads one structured payload as a substitute.
npx astryx part Button # full docs for a part
npx astryx template dashboard # emit full web page supply
npx astryx manifest --json # machine-readable command spec
Themes and the CSS-Variable Cascade
Astryx ships ten ready-made themes. They are named default, impartial, day by day, butter, chocolate, matcha, stone, gothic, brutalist, and y2k. All are absolutely customizable. Theming makes use of a CSS variable cascade. You change the variables, and each part restyles. Component code stays untouched.
The interactive demo beneath reveals this straight. Pick a theme and watch the tokens replace reside.
01 / 06 · Overview
Marktechpost

github.com/facebook/astryx