Repository navigation
Description
Summary
Authored a custom defineTheme theme for a real Next 15 app. The theming model is genuinely great — mostly-pure components driven entirely by a theme. But the authoring loop is slow enough to be the main drag on iteration speed. These are focused DX requests for the theme-building workflow specifically (distinct from the integration traps in #3374; type/build bugs in #3371, #3373).
Versions: @astryxdesign/[email protected], @astryxdesign/[email protected]
Requests, roughly by impact:
1. astryx theme build --watch (biggest win)
Today theme build only takes --out. Every single tweak to the defineTheme file requires manually re-running:
npx astryx theme build theme.ts --out theme.css
Forget it once and you're debugging stale CSS that has nothing to do with your change. A --watch mode (rebuild on save) would turn theming into a real tight loop instead of edit → switch to terminal → rerun → refresh.
2. A theme preview / gallery command
There's no way to see your theme applied across components without wiring up your own page. The theme subcommands are only build / list / add. A command that renders all components (every variant/size/state) against your theme — a generated showcase page — would make it possible to eyeball a theme holistically and catch misses fast. (Design kits commonly ship exactly this as a showcase.html; it's invaluable while tuning tokens.)
3. Surface astryx component <Name> and astryx docs earlier (discoverability)
Most of my "how do I theme X?" time was spent not knowing the answer already existed in the CLI:
astryx component Buttondocuments the themeable slots (thevariant:/size:override keys,data-variant/data-size, the "Override in defineTheme" section, and themeable CSS vars).astryx docs tokenslists the full token namespace.
These are excellent but nothing in the getting-started / theme add scaffold flow points you to them, so it's easy to guess at limitations that don't exist (I wrongly concluded a custom button variant needed a swizzle, when it's a documented theme feature). A one-line pointer in scaffold output and docs would fix most of the learning-curve pain.
4. Papercut: theme overrides fight the theme's own generated rules
To make display headings land I had to set explicit fontSize/lineHeight/letterSpacing in the heading/text overrides purely to out-specify Astryx's generated .level-N rules. Authors shouldn't have to reason about specificity within the generated theme output; setting the relevant token/type override should just win.
5. Clearer defineTheme type errors
Constraints like "typography weights must be strings", "lineHeight/fontWeight must be strings", and "url isn't allowed on a typography role" are reasonable, but the resulting type errors aren't self-explanatory. A couple of annotated examples in the theme docs (and/or friendlier messages) would smooth first-time authoring.
Net
Item 1 (--watch) and item 2 (preview) alone would dramatically speed up theme iteration; item 3 removes most of the learning-curve friction. Happy to help test any of these.
Activity
feat(cli): astryx theme build --watch