One Design System, Different Frontends
- Panda CSS
- Design Systems
- Frontend
- TypeScript
- Park UI
I hadn’t touched Panda CSS since v1, and I didn’t expect to get this fired up coming back to it! In between, most of my frontend work used Tailwind CSS and shadcn/ui. I jumped on Tailwind early and never really looked back, and I still like it a lot. shadcn/ui has been comfortable to work with too. Lately, though, shifts in that ecosystem and the growing dependency and tooling surface around it stopped fitting how I want to organize my own projects.
I’ll own that as a personal preference. Tailwind and shadcn can share tokens across projects just fine, and choosing Panda doesn’t automatically mean fewer dependencies everywhere. What pulled me back in when I paired Panda CSS with Ark UI and Park UI was how cleanly the layers fit a monorepo where different apps run different frontends. Have you ever seen an architectural boundary snap into place so naturally that it immediately reframes how you think about your next build?
One visual identity, whatever frontend fits the job
Here’s the question this setup raises for me: why do we keep letting one framework hold our visual identity hostage? Most of the software I build doesn’t share a single stack. A personal site or documentation hub shines as static HTML in Astro, shipping JavaScript only where an interactive control earns it. A dashboard or internal web app benefits from React and rich form widgets. A desktop utility built with Wails, Electron, or Tauri still renders its interface inside a CSS-capable webview.
Those projects do very different jobs, yet I want them to feel like they came from the same workshop: one coherent warm paper-and-ink palette, the same typography, spacing, borders, and surface conventions, typed in TypeScript with a single place to tune a color so every consuming app picks it up on its next rebuild. Frameworks churn constantly; a thoughtful visual language should outlast whichever runtime carries it this year.
Moving a wider lineup of products onto this setup would be a substantial undertaking, and that’s still future work. For now, my portfolio monorepo is where I built the working foundation, with separate apps for the site and its slide decks:
The journal entries, recipes, slide decks, and their imported media now have their own home in packages/content too. The apps keep their rendering components and publication rules; the content package holds the source material. I want the same clear ownership there as in the design system: one place to write, with each app deciding how to present it.
Keep the foundation pure, leave React out of it
The core package, @b-raffetseder/kiko, is built on Panda CSS 2.6 with zero React runtime anywhere near it. Its foundations.ts file owns the visual language: light and dark paper-and-ink colors, Space Grotesk and JetBrains Mono, semantic roles (bg.*, text.*, border.*, content.link, content.focus, content.linkHover), spacing, motion curves, stacking order, and fixed artwork palettes. Alongside those tokens, recipes.ts exports class-name recipes (shell, button, textLink, tagList) and slot recipes (pageHeader, projectCard, indexRow).
Kiko’s recipes return class names, so the consuming app owns its HTML elements, heading hierarchy, and event handlers. In Astro, a static page styles ordinary markup directly with zero React hydration:
---
import { shell, button } from "@b-raffetseder/kiko/recipes";
---
<div class={shell()}>
<button type="button" class={button()}>Print CV</button>
</div>
The button stays ordinary HTML and adds no client bundle. Kiko builds with panda lib to emit a package manifest following Panda’s design-system workflow. Consuming apps set designSystem: "@b-raffetseder/kiko" in their own panda.config.ts, scan their own source and relevant MDX collections, and generate local styled-system/ helpers. Tokens, CSS properties, and recipe variants like textLink({ tone: "back" }) or projectCard({ palette: "forest" }) autocomplete and type-check right in the editor.
Even hosts that don’t run Panda can use the foundation. Kiko ships prebuilt CSS (styles.css, tokens.css, and a Tailwind compatibility bridge) following Panda’s non-Panda consumption model. Incremental adoption stays practical, with the clear tradeoff that build-time theme extensions and arbitrary css() extraction remain limited to Panda consumers.
Adding real interactivity without duplicating the theme
Static markup and class-name recipes carry content sites a long way. That’s why apps/portfolio stays mostly static Astro, hydrating React only where interaction demands it, and why apps/presentations runs standalone Astro and Reveal slide decks under /slides (with local aliases for the same font families) straight on top of Kiko. Why drag an interactive component library onto pages that only want sharp typography and fast HTML?
Once an app needs dialogs, tabs, comboboxes, popovers, or keyboard-navigable menus, styling alone won’t cut it. That’s where Ark UI and Park UI earn their spot. Ark UI supplies headless, accessible component behavior through framework-specific bindings, and Park UI wraps those primitives in a CLI-generated component catalog styled with Panda and owned inside your own repository. This workspace uses the React catalog.
@b-raffetseder/park-ui inherits Kiko directly via designSystem: "@b-raffetseder/kiko". Its park* component recipes reference Kiko’s semantic tokens directly. No separate Park color palette, no duplicated foundation scales, and no theme-translation adapter glued in between. A React dashboard or React-based desktop webview just points its config at the leaf package:
// panda.config.ts in a React consumer
import { defineConfig } from "@pandacss/dev";
export default defineConfig({
designSystem: "@b-raffetseder/park-ui",
include: ["src/**/*.{ts,tsx}"],
outdir: "styled-system",
jsxFramework: "react",
});
That single config inherits Kiko’s tokens, prefix, and light/dark conditions alongside the React catalog, while packages/icons and packages/illustrations stay separate for whichever apps want them. Keeping the React layer optional lets static Astro pages stay light instead of hauling around interactive machinery they don’t need.
Shared recipes, four ways to build an interface
Here’s a more useful test than four matching buttons: the same reader-settings panel built in Astro, plain React, Park UI, and Vue. Each one has a name field, a digest selector, an updates switch, and an Apply action. Change the values and try them independently. Same paper and ink, same typography, same controls, four different ways to render the markup.
The shared rules are the interesting part. Kiko owns the button recipe, and Park’s default button builds directly on it. Park adds card and input recipes using Kiko’s tokens; the other versions reuse those class-name recipes too. The Park example uses its actual Card, Input, and Button components with their normal styling. There’s no unstyled workaround or second set of matching CSS to maintain. Sharing tokens keeps the visual language consistent; sharing component recipes keeps the actual component rules consistent too.
Astro uses class, React uses className, and Vue binds :class. All four render to static HTML here through Astro’s React and Vue integrations. The selector and switch use native controls, and a small shared script reads each form and updates its result, so this example needs neither React nor Vue hydration. Richer Ark interactions still need their framework runtime. That’s exactly the separation I want: one set of visual decisions, with each frontend owning its markup and behavior.
Where I want to take this next
With the portfolio foundation in place, I want to use the same architecture to refactor the UI of Yap, my local-first dictation app. A Yap monorepo could hold the Panda CSS design system, a dedicated UI library, the Wails application, and an Astro website together. The desktop interface and the website would start from the same visual foundation, with a clear place for every shared design decision.
Thinking beyond Yap, I can see the same layout working for other projects too: an Astro landing page alongside a Wails desktop app and a React web dashboard, with the desktop app and dashboard connected to a shared Go backend. Each frontend could fit its own job while sharing the product’s colors, typography, spacing, and component conventions.
That Go backend could also serve pages or HTML fragments rendered with templ. Those templates could use the design system’s compiled CSS and recipe class names too. A build step would need to make the generated stylesheet and the required class names available to Go; Panda’s TypeScript recipe functions wouldn’t execute inside a Go template. How a client incorporates those HTML responses would remain an app-level choice, but the server-rendered markup could speak exactly the same visual language.
Wails v3 already offers experimental iOS and Android support, opening another possible target for the same Go application and web frontend. I’d still need to adapt the interface and native integrations for a phone, and the experimental status matters.
I can also imagine adding an Expo/React Native app through a converter from supported Panda tokens and style definitions into React Native’s StyleSheet API. Native components would consume those converted values, with their own interaction handling and platform-specific styling. That converter is an idea I’d want to investigate, including how units, fonts, and supported layout properties map across.
Where the sharing stops
Foundation tokens and compiled recipe CSS travel across anything rendering CSS: static Astro pages, server-rendered HTML, React apps, and CSS-capable desktop webviews. The components in @b-raffetseder/park-ui, however, stay React-specific. Astro can render a React component to static HTML without client:*, yet enabling its interactive behavior still requires a client:* hydration directive. A React component can’t serve as a native widget in an unrelated web framework or a non-web native renderer.
Styling, behavior, and app architecture remain separate concerns. Panda extracts static CSS at build time, while Ark UI and React run in the browser to handle state, focus management, and keyboard interactions. Sharing a theme doesn’t erase app-specific routing, rendering, or state choices. Typed tokens and recipe variants catch misspelled keys and invalid props early, yet they can’t verify color contrast, layout collisions, accessible labels, or focus behavior on their own.
Keeping one source of truth in foundations.ts gives me controlled consistency wherever consumers use those shared roles. Deployed apps still need a rebuild and release to pick up updated token values, each host still loads Space Grotesk and JetBrains Mono and manages data-theme, and intentional fixed artwork palettes across light and dark modes stay explicit.
Why this stays code-first
My design work is code-first. Real components and live pages are where I test visual decisions, and Kiko is where the shared values and reusable patterns live. There’s no Figma exporter, importer, or sync pipeline in this repository, and I don’t plan to connect my setup to Figma.
Panda Studio offers a visual way to explore a code-first design system. Panda can emit a design-system.json with panda codegen --spec, and Studio turns that spec into color swatches, spacing scales, type specimens, and motion previews. It also offers token-usage analysis for the source files you give it, plus read-only links for sharing a spec or usage report. The design decisions still live in code; the spec gives a team something visual to inspect and discuss.
For teams working across Figma and code, though, this same structure leaves a useful option on the table. Shared tokens could move through a mapping pipeline into Figma’s documented DTCG JSON import for variables, letting designers and developers share the same named values across tools. Making that work still demands an explicit export or import process, a clear canonical source, and careful mappings for the token kinds each tool supports, with CSS-specific details like fluid clamp() scales needing extra care. For a team with a design-tool workflow, that’s a solid option; my own workflow stays in code.
Starting from one foundation
Having these layers running in one repository has already changed how I think about starting the next app. Static Astro when a page should stay light, React and Park UI when an interface calls for rich interactions, or a webview desktop shell when a tool belongs outside the browser: every one of them can begin from the same visual foundation. That’s the kind of software craft I want more of: picking the right frontend for the job without reinventing your visual language every time the stack changes.
I’ll definitely put together a starter template for this architecture over the next couple of days. Once I’ve worked out a concrete plan, I’ll publish it as an open source repository so you can try the setup yourself.