Designing for Governement
Reverse-engineering a design system from a live production website, deploying it across Cabinet Office and MOD services, and exploring how AI can radically accelerate government prototyping.
The GOV.UK Design System publishes detailed HTML/CSS guidelines online, but has no officially maintained Figma library from GDS. Community-built kits exist, but they carry no guarantee of accuracy or maintenance cadence, and anything drifting from the live frontend risks accessibility regressions, incorrect states, and mismatched spacing propagating into delivered code.
Rather than relying on documentation alone, I inspected live GOV.UK service pages, examining component markup, computed styles, interaction states, error conditions, and responsive breakpoints, then updated or rebuilt each element faithfully in Figma.
Inspect Live Components
Examined production GOV.UK pages in DevTools, capturing exact spacing tokens, typographic scale, colour values, and state variants (default, hover, focus, error, disabled).
Build Figma Component Library
Replicated all key GOV.UK components as production-faithful Figma components with variants, ensuring designers could use them with confidence rather than making visual approximations.
Validate Against Spec
Cross-referenced each component against the GOV.UK Design System documentation and real service pages to catch any drift before the library was shared with design and dev teams.
As part of the Figma setup, existing colour and typography styles were converted into Figma variables. This maps directly to how GOV.UK Frontend uses CSS custom properties, making the handoff more accurate, enabling brand theming through mode switching rather than manual overrides, and giving the whole library a single source of truth for every token.
The single Figma library, centered around a core of primitive and semantic variables, uses Figma Modes to seamlessly adapt one master component to two distinct services (GOV.UK and Ministry of Defence). With a simple switch of the mode, the same component dynamically restyles to meet each service's unique audience, constraints, and design decisions.
Adhering to GOV.UK GDS standards, these designs implement a consistent, accessible framework. We developed tailored UI components based on established GOV.UK patterns to handle complex property data while ensuring a seamless, intuitive user experience.
The DSCC project required maintaining the structural integrity and accessibility of the GOV.UK system while expressing the MOD's distinct identity, particularly important given the serious and sensitive nature of the service.
An emerging area of exploration: using AI to iterate on prototypes directly in the browser, rather than in Figma to produce more realistic simulations of the actual user experience.
The combination of a faithful Figma component library, brand-adapted design for the MOD, and AI-assisted prototyping created a substantially more efficient and consistent design process across both services.
Audit Live Assets
Government services designed using the reverse-engineered library
Translate to Design
Component states & variants documented in Figma from live inspection
Rigorous Validation
Potential for AI-assisted prototyping to compress design iteration cycles
The GOV.UK Design System publishes comprehensive HTML/CSS guidelines and component documentation online, but has no officially maintained Figma library from GDS. Community-built kits exist, but they carry no guarantee of accuracy or maintenance cadence, and anything drifting from the live frontend is a liability. Accessibility regressions, incorrect interaction states, and mismatched spacing can all propagate downstream into delivered code.
The response was to go back to the source and reverse-engineer directly from the live GOV.UK website, building a faithful Figma component library that designers and developers could share with confidence.
Rather than relying on documentation alone, I inspected live GOV.UK service pages in DevTools, capturing exact spacing tokens, typographic scale, colour values, and state variants (default, hover, focus, error, disabled). Each component was then replicated in Figma with full variants, and cross-referenced against the GOV.UK Design System documentation and real service pages before the library was shared with design and development teams.
As part of the setup, existing Figma colour and typography styles were migrated into Figma variables. This aligns the library with how GOV.UK Frontend works in code (using CSS custom properties throughout), makes design-to-dev handoff more precise, and means brand theming can be applied through mode switching rather than manually overriding individual components. For the MOD adaptation in particular, switching between GOV.UK and MOD brand values became a single variable mode change rather than a file-wide find-and-replace.
Cabinet Office: Property Insite. Designs for an internal property management service at property.insite.cabinetoffice.gov.uk. The reverse-engineered Figma library enabled rapid, high-fidelity design handoff, giving developers screens they could build against with confidence.
MOD: Defence Serious Crime (DSCC). A service for armed forces personnel (Army, Navy, and RAF) to report crimes and access help and information. The project adopted GOV.UK as a structural foundation, then adapted it to the MOD brand through adjusted colour palette, typography, and header and footer branding, all while maintaining full WCAG compliance.
The core GOV.UK interaction patterns were retained wholesale: task list flows, error states, form patterns, summary pages, and navigation conventions. These patterns exist because they work for users; changing them without evidence would be counterproductive, and in a sensitive service like DSCC, consistency with established government patterns also builds trust.
What changed was the visual expression: the primary colour palette shifted from GOV.UK black and blue to MOD navy (#1a2744) and red (#c0392b), with updated typography and defence-appropriate branding in the header and footer.
An emerging area of exploration is using AI to iterate on prototypes directly in the browser rather than in Figma. Browser-based prototypes can run real GOV.UK Frontend CSS, simulate conditional logic, and behave more like a live service, which can be valuable for early-stage flow testing and concept exploration.
The benefits are real: entire user journeys can be scaffolded quickly, the feel is more realistic than a Figma prototype, and ideas can be discarded cheaply. But the limitations are equally real: visual accuracy is not guaranteed (even with explicit instructions, AI introduced errors such as rendering the GOV.UK header bar black rather than the correct blue), the output is not reliable enough to serve as a dev specification, and the handover process from AI prototype to production code still needs a defined answer.
The honest verdict: a useful tool for exploring ideas quickly and getting something in front of users early, but not a replacement for accurate design handoff.