Export & own your code
Milda's first promise is that the code is yours. What comes out of the compiler is plain React and TypeScript - no proprietary runtime, no hidden dependency on Milda at your app's runtime. This page is the concrete version of that promise: what “you own the code” actually means, the real ways to get and keep your code today, and what happens if you ever walk away.
#What “you own the code” means
Milda is a compiler, not a component runtime you rent. The React generator turns your document into ordinary source files - one .tsx per component, a shared theme.css of design tokens, and a self-contained Icon module. Concretely:
- No proprietary runtime. The generated components import only
reactandreact-dom(declared as peer dependencies). There is no@mildastudio/runtimeyour app has to pull in to render them - the output stands on its own. - No hidden calls home. Assets like custom icons and fonts are vendored into the output as inline data at release time, so a running app never hotlinks Milda's storage. Nothing about the shipped code phones back to us.
- Ordinary React you can read and change. The code is generated to be idiomatic - the same source the example design system's storefront imports directly. You can vendor it into your repo and edit it like any other file.
- The output is legally yours. Per Milda's output-ownership clause, the generated code is your code, unrestricted, and is not treated as a derivative work of the generator. That clause is non-negotiable regardless of which edition you're on. See Editions & pricing.
asChild, declared seams) so you rarely need to. Ejecting is the escape hatch that's always there; it's not the daily path.#The ways to get your code
There are three routes to holding your code, and they serve different needs. All three exist and work now.
#1. Install the released library
The primary, supported path. You release your design system from the Studio; the registry service builds it and publishes a versioned npm package. Consumers install it like any dependency:
npm install @your-scope/ds
The published package is a normal, built npm artifact: ES modules, CommonJS, and .d.ts type declarations (built with tsup), plus the raw theme.css. It depends only on React as a peer. Because it's a plain package on the npm protocol, once it's in your node_modules (or your lockfile / an internal mirror) it behaves like any other dependency you control - no Milda account is needed to install it or to keep using a version you've already got.
dist output (esm + cjs + types), not the readable .tsx source. That's the right shape for consuming a library. If what you want is the editable source itself, use route 2.#2. Download it from the Studio
The Export menu in the editor offers four downloads, none of them gated:
- Download source (.zip) - the generated React package as editable source, identical to what a release builds.
- Download Milda file (.milda) - the whole design system in its own language, readable back by the Studio, the Playground or any reader.
- Download bundle (.milda + assets) - the same file with the asset bytes beside it, so the text stays diffable in a pull request.
- Download self-contained (.milda) - the same file with every asset inlined as a data URI, so it needs nothing else.
The Export menu downloads the generated React source as a zip, the .milda file, a bundle with the asset bytes beside it, and a self-contained file with every asset inlined.
#3. Generate the source locally
The generator is the open part of Milda. Given a document, it emits the actual source files - the same generate() the release pipeline runs, written to disk instead of built and published. The CLI does this from a hosted or pulled system with milda generate --target react, and the open packages (@mildastudio/generate, @mildastudio/core) do it from any document you hold. Because generation is deterministic, you can regenerate at will and diff the output; nothing is locked inside a service.
#What happens if you stop paying or leave
The freedom to leave is the whole point of the ownership promise, so here it is concretely. The line runs between the code you already have and the hosted pipeline that produces new code.
#What you keep
- Every version you've already installed. Packages already in your lockfile,
node_modules, or an internal npm mirror keep working. They don't check a license at runtime and don't need Milda to be reachable. - Any source you've generated or vendored. Source produced via the open generator (route 2) or checked into your repo is yours to keep and edit forever. Nothing revokes it.
- The open generator itself. Local generation, the core, and the DSL are the open client. You can keep generating a React library from an IR you hold, on your own machine, with no subscription.
#What you lose
- Private registry hosting. The hosted, versioned
@scope/dsregistry is the paid gate. Without it you don't get new hosted publishes - but you can point the same protocol-compatible flow at your own registry or publish to the public npm registry, and Enterprise supports bring-your-own / self-hosted registries. - New releases through the hosted pipeline. Cutting new versions via the Studio's release flow (build + publish + contract-diff versioning) runs on the hosted service. Stop paying and you stop getting new versions from that pipeline - not the ability to generate code, which stays open.
- The editor and collaboration. The visual Studio, real-time collaboration, roles, and version history are the hosted product. What they produce (your IR and your generated code) is portable; the convenience of authoring in the Studio is what the subscription buys.
npm install, live updates) is seamless. The pipeline's convenience is the paid value; the freedom to leave with your code is the trust.#In short
- The output is plain React/TS you legally own - no proprietary runtime, no calls home.
- Get it three ways:
npm installthe released package (built), download the source or the.mildafile from the Studio, or generate the source locally with the CLI or the open generator. - If you leave, you keep everything already installed or generated and the open generator itself; you lose the hosted extras - private registry hosting, new hosted releases, and the editor.
Related: Release & registry, Generators, and Editions & pricing.