[data-reveal]{opacity:1!important;transform:none!important}
Design fidelity
AI & coding agents

Design fidelity

What an agent does with your mockup — one framing question, then component by component, a preview of the DMS block next to a sketch of the custom one, and the choice between keeping, adjusting or replacing the block.

A mockup rarely maps one-to-one onto DMS blocks. Rather than guess how faithful you want the result, an agent following the dms-best-practices skill asks you — once for the whole screen, then once per component that differs visibly.

To see the comparison interface, open the Cards and Compact sketch example. Its demonstration data illustrates choosing a variant, not the quality of a model's design interpretation.

One framing question

Before it builds anything, the agent asks how faithful the result should be:

ChoiceWhat happens
Pixel perfectThe agent reproduces the design, building custom blocks where no DMS block matches.
DMS equivalentsThe agent maps every component onto its closest DMS block without asking again, except for a component that no block or composition covers.
Component by component (recommended)The agent walks through the components that differ and lets you decide each one.

Component by component

For each component of the mockup, the agent finds the closest DMS block, through its options or a composition of blocks. Differences the theme absorbs — colors, spacing, radius, fonts — never trigger a question. For a visible difference — a different layout, a missing element, another kind of chart — the agent runs the path before any custom block:

It searches the catalog

The agent looks for the block, its options or a composition of blocks that comes closest to the component.

It shows the comparison

The agent calls PreviewBlocks with the DMS block and your mockup as reference. An attachment appears in the conversation; click it to see the real block, rendered with your theme, next to your design. Another tab shows a sketch of the custom block it would build, and further tabs can show the DMS block with other options.

It asks

The agent asks one closed question, with buttons in the dms-ai chat:

  • Keep the DMS block
  • Adjust it through its options
  • Build a custom block

It builds what you chose

A custom block, when you choose one, follows the best practices: only that block is custom, it carries .meta(), and the rest of the page stays DMS blocks.

In safe mode, the dms-ai assistant cannot build a custom block. It offers the closest DMS composition instead, and asks whether to switch to Code mode for that one block.

Preview blocks yourself

Use the component catalog to compare blocks before you design around them. Many pages offer a live preview with controls; blocks that need backend data or page context also explain what the preview cannot show. To preview a whole tree, open the block preview page of a local DMS.

Next steps

Components

Choose a block through examples, previews and options.

Block preview page

Render any tree of blocks from a URL.