Dataset
Front-end design to code datasets for AI training
A design to code dataset is shipped front-end code, such as React, Vue, Angular, HTML and CSS, linked to the design file frames it implements, with design tokens, component library source, design-review comments and rendered screenshots of both sides. SourceX sources these pairs to a buyer's spec from established product companies and digital agencies, which hold the design half in Figma or Sketch and the code half in git, joined by ticket or handoff links. Each dataset is de-identified and licensed for an agreed permitted use.
Dataset manifest
Sourced to your spec- What it is
- Design frames linked to the shipped UI code that implements them, with tokens, review comments and renders
- Typical systems
- Figma, Sketch, Zeplin, Storybook, GitHub or GitLab, visual testing tools such as Chromatic
- Typical history
- Varies by partner; depends on design file version history and how long handoff links were kept
- Modality
- Source code and design node trees, with screenshots and review comment text
- Delivery formats
- Code as files at a pinned commit; design nodes and tokens as JSON; renders as PNG; joins as JSONL
- Preparation
- Licensed fonts, stock imagery and client brand assets cleared, substituted or stripped; personal data in mock content removed
- Licensing
- Scoped per product or project; agency work depends on what the client agreement allows
- Availability
- Sourced to your spec; pairing depth depends on the partner's design system and handoff practice
What a delivery contains
Fields vary by source system and are fixed per order. A typical delivery includes:
| Field | Type | What it holds |
|---|---|---|
| pair_id | string | Pseudonymous ID for one design frame and the code that implements it. |
| design_ref | object | Design tool, tokenized file, page, frame name, node ID and the file version in force at handoff. |
| design_tree | object | The frame's node tree: types, sizes, auto layout settings, text, and component instances with overrides. |
| design_render | object | Image of the frame exported from the design tool. |
| code_ref | object | Tokenized repository, commit, framework, styling approach and the files that implement the frame. |
| component_map | array | Design components matched to code components and props, with how each match was established. |
| tokens | object | Design tokens used on both sides, the active mode, and literal values in code that bypass a token. |
| state_coverage | object | States and widths the frame draws against those the code implements, such as loading, empty and error. |
| build_render | array | Screenshots of the built UI per state and viewport, captured with known fonts and fixture data. |
| deviations | array | Each difference between frame and build, classed as responsive, missing state, accessibility, constraint or defect. |
| design_review_threads | array | Design file comments, pull request reviews and design QA notes, with role, anchor and resolved status. |
| link_evidence | object | How the frame was joined to the code: a design URL in a ticket or pull request, or an inferred match. |
| accessibility | object | Automated scan results and review notes on contrast, focus order, labels and semantics. |
| asset_rights | object | Fonts, images, icons and brand assets in the pair, each marked cleared, substituted or stripped. |
Field names from the table above; values are masked placeholders.
Example record
{
"pair_id": "dp_6e02c9",
"design_ref": { "tool": "figma", "file": "file_tok_a41c", "page": "Billing", "frame": "Invoices / List",
"node_id": "412:1877", "version_at_handoff": "2024-04-18T09:30:00Z" },
"design_tree": { "type": "FRAME", "width": 1440, "layout_mode": "VERTICAL", "item_spacing": 24, "node_count": 86,
"children": [ { "type": "INSTANCE", "component": "Table/Default" },
{ "type": "INSTANCE", "component": "Button/Primary/Medium" } ] },
"design_render": { "path": "renders/design/dp_6e02c9@2x.png", "scale": 2 },
"code_ref": { "repo": "repo_tok_19", "commit": "8c41d7e", "framework": "react", "styling": "css_modules",
"files": ["src/billing/InvoiceList.tsx", "src/billing/InvoiceList.stories.tsx"] },
"component_map": [
{ "design": "Table/Default", "code": "DataTable", "source": "design_system_mapping" },
{ "design": "Button/Primary/Medium", "code": "Button", "props": { "variant": "primary", "size": "md" } }
],
"tokens": { "mode": "light", "used": ["color.text.primary", "space.300", "radius.md"], "literals": ["#6b7280"] },
"state_coverage": { "designed": ["default@1440"],
"implemented": ["default", "loading", "empty", "error", "narrow"] },
"build_render": [
{ "state": "default", "viewport": [1440, 900], "path": "renders/build/dp_6e02c9_default_1440.png" },
{ "state": "empty", "viewport": [375, 812], "path": "renders/build/dp_6e02c9_empty_375.png" }
],
"deviations": [
{ "kind": "missing_state", "detail": "No empty state in the frame. Engineer added one, designer approved the copy." },
{ "kind": "responsive", "detail": "Table becomes stacked cards on narrow screens." },
{ "kind": "accessibility", "detail": "Secondary text darkened to meet contrast." }
],
"design_review_threads": [
{ "where": "design_comment", "anchor_node": "412:1902", "role": "front_end_engineer",
"text": "What should this show with zero invoices?", "resolved": true },
{ "where": "pull_request", "role": "designer", "text": "Row height should be 48, not 40.", "resolved": true }
],
"link_evidence": { "method": "design_url_in_pull_request", "ticket": "tkt_2207", "confidence": "explicit" },
"accessibility": { "automated_scan_violations": 0, "keyboard": "focus order reviewed" },
"asset_rights": { "fonts": [ { "family": "[LICENSED_FONT]", "status": "substituted" } ], "images": "none" }
}Synthetic record for illustration. Field names, structure and format are agreed per order.
What AI teams use it for
Generate UI code from a design
The node tree and render are the input, the shipped component is the target, and the component library is the context to reuse.
Screenshot to code with real targets
Build renders paired with the source that produced them replace scraped pages, which show only compiled output.
Automate design review
Deviations and review threads teach a model to spot differences between frame and build and to tell an intended change from a defect.
Fill in what the design omits
State coverage shows the loading, empty, error and narrow layouts engineers added to what the frame drew.
Reuse components instead of writing markup
Component maps train a model to pick the existing library component and props.
Use-case guides: Coding agents, Private evaluation sets, Enterprise and computer-use agents
What makes this data valuable
Design pinned to handoff
The frame is the version the engineer built from, not the file as it looks today.
Explicit links
A design URL in the pull request or ticket joins the two halves without matching by name.
Mapped components
Design instances resolve to named code components and props across most of the frame.
Comparable renders
Design and build images share viewport, fonts and content, so differences are real.
Review threads kept
Comments carry roles and resolved status and are tied to their pair.
States beyond the default
Loading, empty, error and narrow layouts are captured.
Document stack
Design to code dataset
Why the shipped screen differs from the frame
A design frame is a picture of one state at one width with ideal content. It is usually drawn at a desktop width, with short names, a few table rows and no errors. The shipped code has to handle every width, long and translated strings, zero rows and thousands, loading, failure, keyboard focus and screen readers. The code holds more than the frame, and the visible parts differ too: spacing snaps to the token scale, a gray is darkened for contrast, a table becomes stacked cards on a phone. From frames and code alone, a model cannot tell which differences were decisions and which were mistakes.
The reasons sit in the conversation around handoff. A comment pinned to a node in the design file asks what the screen shows with no data. The pull request carries the designer's note on row height and the engineer's reply that the component has no such size. Kept with their resolved status and tied to the pair, these threads label each deviation as responsive behavior, a missing state, accessibility, a technical constraint or a defect. That labeling is the supervision a design-to-code model needs.
Two conditions decide whether a pair can be trusted. Design files are edited after the build, so the frame must be pinned to the version at handoff, taken from the file's version history or a branch. The renders must also be comparable: same viewport, same fonts, known data. A licensed typeface replaced by a substitute changes text width and line breaks, so each substitution should be recorded. Stripped stock images and client logos leave placeholders, which should be marked so they are not learned as design.
What a design system does to the pairs
In an organization with a mature design system, a button in the design file is an instance of a library component with named variant properties, and the code has a Button component whose props usually carry the same names. Spacing and color come from tokens that exist on both sides under one name, published from a single source. Mapping design to code is then close to a lookup: an instance of Table/Default becomes DataTable, and each variant becomes a prop. Some teams write the mapping down, in Storybook stories that carry the design URL or in mapping files kept beside the component. What remains to learn is layout and composition.
A one-off marketing page or an early product looks different. The frame is rectangles and text at absolute positions, with values typed by hand, and the code is bespoke markup and CSS that nothing else reuses. Many implementations would be equally valid, so the shipped one is a weak target. Such pairs still teach layout, but they should be labeled. Three measures on a sample separate the two kinds: the share of design nodes that are library instances and not detached copies or raw shapes, the share of style values in code that reference tokens and not literals, and whether one design component maps to one code component.
A history often spans a migration, from hand-written styles to tokens or from one component library to another, so pairs should be dated against the system version they were built on. Much of the code-side library may not be the partner's own, since teams wrap open-source component libraries. Ask for third-party packages and their licenses to be identified, and for code produced by a design export plugin to be flagged as tool output.
What to check before licensing
- Compare the design render with the build render for ten pairs. Check that viewports match and each visible difference is listed in deviations.
- Ask how each frame was linked to its code. A design URL in a pull request, ticket or story file is stronger than a match on names.
- Confirm each frame is pinned to the design file version at handoff, and ask how far back the file's version history goes.
- Ask for an inventory of fonts, stock images, icon sets and illustrations with the license status of each, and check how stripped or substituted assets are marked.
- For agency work, have counsel confirm the agency may license the client's designs and code, and that client logos, trademarks and brand guidelines are cleared or removed.
- Measure on the sample the share of design nodes that are library instances and the share of code style values that reference tokens.
- Ask which open-source component libraries the code builds on, and check mock content and comments for real names, emails and avatars.
Delivery No files move before a signed license. A listing or a request grants no files by itself.
How licensing works through SourceX
- 1
Define
Send the domain, modality, volume, format, timeline and permitted use you need.
- 2
Source
SourceX identifies businesses that hold matching data and are open to licensing it.
- 3
Qualify
Fit, rights and quality are checked, and you review samples before committing.
- 4
License
Scope, permitted use, exclusivity, price and obligations are agreed in writing.
- 5
Deliver
Approved data is prepared, de-identified where required and transferred securely.
Questions Acquisition Partners ask
How are design frames matched to the code that implements them?
Through links the team left during handoff. A design URL that points at a frame is often pasted into the ticket, the pull request or a Storybook story, and some teams keep files that map design components to code components. Where no link exists, a match is inferred from names and render similarity and should carry a confidence flag.
Is the design file itself delivered?
That is for your spec to say, and an export is usually the more useful form. A frame's node tree as JSON with a rendered image is what a model can read, and it carries only the frames in scope. Native Figma or Sketch files can be requested where the partner's rights allow, but they bring along embedded images, linked library components and unrelated pages that then need clearing.
Why not pair screenshots of public websites with their HTML?
Because that captures the output of a build and nothing upstream of it. Public pages serve compiled and minified markup, not the component source, and there is no design file, token set or review thread behind them. This dataset starts from the design the team drew and the source they wrote.
What happens to licensed fonts and stock images?
They should be cleared, substituted or stripped, with each case recorded. Font files and stock photographs come to the partner under licenses that may not allow redistribution in a dataset. Substituting a font changes line breaks in renders, so check that substitutions are marked per pair, and have counsel review the asset inventory.
Can agency work for clients be included?
Only where the agency has the right to license it. Client agreements often assign designs and code to the client, which can leave the agency with nothing to license, and logos and trademarks stay the client's. Ask for the basis of the agency's rights per project, have counsel read it, and confirm that client names and brand marks are removed.
Does this cover native mobile apps?
No, this page describes web front ends, including responsive layouts for phone-sized screens. Native iOS and Android code has different layout systems and release records, and is a separate kind of dataset. If you need both from one product, say so in your request, because the same design file often serves both.
Related datasets
- Proprietary codebases with full history
Complete private repositories with full version history, build files, tests and docs
- Mobile app codebases with release history
Private iOS and Android app repositories with UI layouts, build configuration, release history, crash clusters and store review notes
- Business presentation decks
Real slide decks with layouts, chart data, speaker notes and revisions
- Computer-use trajectories and action-labeled screen recordings
Screen recordings of employees doing real tasks, with synchronized input events, interface state and verified outcomes
- Software engineering histories (issues, PRs, reviews)
Issues linked to commits, pull requests, code review, CI runs, deploys and incidents
Evaluating this data for procurement?
Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.
Request dataset diligenceTell us what your models need
Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.
Updated 25 November 2026.