Skip to content

Converting Claude Design mockups

Claude Design keeps each component and screen of a mockup in a .dc.html file whose styles and data a small script computes. The plugin ships a converter that turns a folder of these files into components, documents and their style sheets, and reports what it left for you: event wiring, view model data and what it cannot translate. It is a Python script that runs on the Python of your Unreal Engine install, so there is nothing to install. For a plain .html page use Converting an HTML page.

Run it

Open PowerShell and run one command:

& "<Engine>\Engine\Binaries\ThirdParty\Python3\Win64\python.exe" -I "<ArcRmlUI>\Extras\DcConvert\dc2rml.py" --source "<Mockup>" --dest "<Project>\Content\UI\Rml\Kit"

<Engine> is the folder of your Unreal Engine install, <ArcRmlUI> the plugin folder (the one that holds ArcRmlUI.uplugin) and <Mockup> the folder with the .dc.html files and the mockup's themes.js. Where that folder is depends on where the design was made: a Claude session that works in a folder on your disk writes the files there; a design kept in the cloud is downloaded as a .zip and unzipped.

The last line is the summary, for example ArcRmlDcConvert: wrote 24 files, 0 errors, 1 warnings, 9 manual. The run passes with exit code 0 ($LASTEXITCODE in PowerShell) and fails with 2 when there is an error. Warnings and manual entries do not fail it.

Argument Effect
--source The folder with the .dc.html files.
--dest The folder to write into, a disk path under the Content folder of the project or of a plugin in the project's Plugins folder. A folder under no Content folder fails with "is not under a content root".
--icons The folder of the icon .svg files, under a Content folder. Default: UI/Rml/icons in the Content folder of --dest.
--only Convert only these names, separated by commas (--only Button,Panel). A name with no .dc.html fails the run.
--overwrite Overwrite existing output files. Without it, existing files fail the run and nothing is written.
--json <File> Also writes the report as JSON to <File>, in the format of the validator, with a manual count in its summary.

Icons

A mockup draws its icons with Lucide when the page runs, so the converter has no icon artwork. It writes each icon as an <svg> whose src is <name>.svg in the --icons folder, and checks that the file exists. For each missing file the report has a manual entry "the icon file is missing; add .svg to the icons folder": download that icon from lucide.dev as SVG and save it there under that name.

What it writes

  • tokens.rcss from themes.js: the default theme and the shared tokens in :root, every other theme in a body.theme-<name> rule. Each theme rule also holds the tokens the themes.js preset loop derives (the overlay fallbacks, the --ui-ornament-1/-2 level flags). Without a themes.js the run warns and writes no tokens.rcss. The font families the tokens name need an @font-face in one of your font sheets.
  • For each component (a file that declares its own props): <Name>.rml, a <component> with one <prop> per prop and its default, and <Name>.rcss. Fixed styles become classes (dk-<name> on the root); a style that changes with a true/false or a choice prop becomes a modifier class switched by class:*; a style that follows a number becomes style:*. Hover styles apply to :hover and :focus-visible.
  • For each screen (a file that imports components and declares no props): a document that links tokens.rcss and its own .rcss, with :model on <body>. Imports name the components by package path in the --dest folder.

Files with no <x-dc> template, and the pages named GameUI, Components, Style Guide, HudDebug, HudPlaceholder and Hud...Check, are skipped with a warning; name one in --only to convert it.

The report

Each entry prints as <file>(<line>): <severity> <code>: <message>, with the line of the .dc.html file. An entry with the code Manual is a part the converter left for you; its message names the element, the mockup code and what to do. The ones you meet most:

Message What to do
event wiring: ... Put on:click with call() on the import (Events).
:for over $<list>; item struct <Name> { <fields> } ... Give the view model a list of rows with these fields (Struct lists).
needs external data: ... See Lists built in the mockup.
screen shell: ... Add the head of the screen: <meta> names, the <viewmodel> for its :model, focus areas and Back (Documents, Navigation).
... write this style by hand, ... write this declaration by hand, ... write the rule by hand The converter could not reduce the style to classes; write it in the .rcss.
... the class value loses to the inline style:<property> A style:* shorthand hides a longhand of a modifier class; write the combined value by hand.
... the focused look prop is a :focus-visible rule, not data Write the look as a :focus-visible rule.

Lists built in the mockup

A list the mockup builds in its script (rows of a table, entries of a menu) is data your game supplies, so the converter does not invent it. In the .rml it writes a comment <!-- TODO dc2rml: external data: ... --> where the list goes, and the report has a needs external data entry with three options:

  1. a view model list with an item struct you name; the loop body to repeat is at the line the entry names,
  2. the mockup's items written as static RML, marked <!-- TODO -->,
  3. leave it out.

Pick one per list.

Check the result

Validate the --dest folder: Validate RML on the folder in the Content Browser. The validator skips component files and checks each component inside the documents that import it; to check a component no screen imports, import it in a small document and validate that. A var(--x) that a converted rule reads and nothing declares is an error there: declare it with its default in the component's .rcss.

With an AI agent

Extras/AgentSkills/ holds two skills that run the converter and work through its report for you; install and limits: Working with AI agents.