# UI Workflow Guide > Your step-by-step journey to building high-performance, cinematic game interfaces using HTML5 technology!. Each link below is a page's Markdown version (the page URL + `index.html.md`). The whole documentation, as sections tagged with their page URL, is in [llms-full.txt](https://guide.coherent-labs.com/llms-full.txt). ## Building with ai - [Design First](https://guide.coherent-labs.com/building-with-ai/design-first/index.html.md): An agent with a design system is a good implementer. An agent without one is a bad designer. The decisions to settle before the first UI prompt. - [Three UIs Built with an Agent](https://guide.coherent-labs.com/building-with-ai/experiments/three-uis-with-an-agent/index.html.md): A screen added to an existing dashboard, a chart component family, and a complete eight-screen interface: what we tried, what came back, and what we took away from all three. - [Setting up the MCP Server](https://guide.coherent-labs.com/building-with-ai/gameface-mcp-server/index.html.md): Install and configure the Gameface MCP server so a coding agent can read the Player console, inspect the DOM, capture screenshots, and assert on layout. - [Grounding the Agent](https://guide.coherent-labs.com/building-with-ai/grounding-the-agent/index.html.md): The documentation corpus and the negative ruleset: two pieces of context that prevent an agent writing browser CSS into a Gameface project. - [Overview](https://guide.coherent-labs.com/building-with-ai/overview/index.html.md): Why coding agents produce CSS that Gameface refuses to render, what tooling closes that gap, and how the articles in this chapter fit together. - [The Conductor Skill](https://guide.coherent-labs.com/building-with-ai/the-conductor-skill/index.html.md): A skill that requires the agent to clarify requirements and obtain a signed-off written specification before writing any UI code. - [Working in Unreal Engine](https://guide.coherent-labs.com/building-with-ai/unreal-engine/index.html.md): Use the Unreal MCP server together with the Gameface MCP server, so one coding agent can edit your Unreal project and check the Gameface UI it builds. - [Verifying What the Agent Builds](https://guide.coherent-labs.com/building-with-ai/verifying-ai-output/index.html.md): Agent-written UI code fails in ways that survive code review and a dev server. Five layers of checking, and the bug class only a production build reveals. ## Getting started - [Core Concepts & Information Flow](https://guide.coherent-labs.com/getting-started/core-concepts-and-information-flow/index.html.md): Transitioning from standard web development to game UI requires a fundamental shift in how you think about data and structure. In this article, we will cover how data flows between the game engine and your interface, why your UI should stay as "dumb" as possible, and how to structure your HTML documents into optimized "Views". - [Hello World: Your First Gameface UI](https://guide.coherent-labs.com/getting-started/hello-world/index.html.md): An overview of what comes next: the recommended tech stack for Gameface UI development, and a pointer to the hands-on inventory tutorial to get you building immediately. - [Introduction: Welcome to the UI workflow guide](https://guide.coherent-labs.com/getting-started/introduction/index.html.md): Your first steps into the world of Gameface development. Learn how to run your UI in the Player, understand the architecture, and find your way through the guide. - [The Gameface Player](https://guide.coherent-labs.com/getting-started/the-gameface-player/index.html.md): Use the Gameface Player to load, preview, and debug your game UI without needing a running game engine. Covers loading UI, keyboard shortcuts, configuration, DevTools access, and Player Overrides. ## Layout assets and styling - [Animated Assets: GIFs & Videos](https://guide.coherent-labs.com/layout-assets-and-styling/animated-assets/index.html.md): Understand the constraints of GIF animations, implement WebM video playback correctly, and learn when to prefer alternatives like sprite sheets and live views. - [Animation Libraries in Gameface](https://guide.coherent-labs.com/layout-assets-and-styling/animations/animation-libraries/index.html.md): Learn when to use tested animation libraries in Gameface, how to set them up, and which engine-specific limits to keep in mind before adding a JavaScript animation library to your UI. - [Sprite Sheet Animations: Building High-Performance VFX](https://guide.coherent-labs.com/layout-assets-and-styling/animations/sprite-sheet-animations/index.html.md): Build high-performance visual effects with CSS sprite sheet animations. Covers background-position shifting with steps(), mask-image sprite sheets for recolorable VFX, scaling strategies for different resolutions, and a full teardown of a layered spiral ability effect. - [SVG Animations: Vector Motion and Effects](https://guide.coherent-labs.com/layout-assets-and-styling/animations/svg-animations/index.html.md): Animate inline SVG elements with CSS keyframes in Gameface. Covers looping fill/stroke effects, stroke-dash animations, and all SVG-specific constraints in one place. - [UI Animations: Transitions, Keyframes, and JS Control](https://guide.coherent-labs.com/layout-assets-and-styling/animations/ui-animations/index.html.md): Learn how to animate your game UI with CSS transitions, keyframe animations, @starting-style mounting effects, and JavaScript playback control in Gameface. - [Web Animations API (WAAPI)](https://guide.coherent-labs.com/layout-assets-and-styling/animations/waapi/index.html.md): The supported subset of the Web Animations API in Gameface: getAnimations, reverse, finish, cancel, commitStyles, persist, playbackRate, and the element-level events to use when animation.finished and addEventListener are not available. - [Dynamic Styling in JavaScript: Classes, Typed OM, and Extensions](https://guide.coherent-labs.com/layout-assets-and-styling/dynamic-styling--variables/dynamic-styling-in-javascript/index.html.md): Learn how to dynamically update your game UI styles using high-performance JavaScript techniques, from toggling classes to utilizing Gameface DOM extensions. - [Managing Variables: CSS Custom Properties vs. SCSS](https://guide.coherent-labs.com/layout-assets-and-styling/dynamic-styling--variables/managing-variables/index.html.md): Learn how to manage design tokens efficiently by understanding the performance costs of native CSS variables and the benefits of SCSS preprocessing. - [Gameface CSS: Simple Layout & Opacity](https://guide.coherent-labs.com/layout-assets-and-styling/gameface-css/index.html.md): Learn how Gameface's proprietary display: simple and coh-simple-opacity properties bypass expensive layout and GPU compositing operations to reduce CPU and GPU overhead in game UI rendering. - [Advanced UI Shapes: 9-Slice, Clipping, and Masking](https://guide.coherent-labs.com/layout-assets-and-styling/graphics--shapes/advanced-ui-shapes/index.html.md): Build flexible game UI panels with 9-slice borders, polygon clipping, and alpha masks. - [Image Assets: SVGs vs. Rasters](https://guide.coherent-labs.com/layout-assets-and-styling/graphics--shapes/image-assets/index.html.md): Choose between SVG and raster image assets, and load each format in a way that matches its runtime behavior. - [SVG UI Tricks: ViewBox, Strokes, and Fills](https://guide.coherent-labs.com/layout-assets-and-styling/graphics--shapes/svg-ui-tricks/index.html.md): Build dynamic inline SVG UI patterns with fill and stroke variants, viewBox camera control, and stroke-dash progress effects. - [Texture Atlases](https://guide.coherent-labs.com/layout-assets-and-styling/graphics--shapes/texture-atlases/index.html.md): When packing images into texture atlases pays off in Gameface, and how to build, preload and tune them in Gameface UI projects. - [Laying out the screen](https://guide.coherent-labs.com/layout-assets-and-styling/laying-out-the-screen/index.html.md): Learn how to architect your game UI using absolute anchors and flexbox for peak performance - including how Gameface's Yoga engine classifies layout work, the two optimizations that eliminate the worst-case performance cliff, and when to use Gameface's proprietary display modes. - [Building Scalable & Responsive Game UIs](https://guide.coherent-labs.com/layout-assets-and-styling/styling--scalability/building-responsive-game-ui/index.html.md): Learn how to build responsive game UIs that scale flawlessly across multiple resolutions using viewport units, REMs, and dynamic scale factors. - [DOM Size Management & Hiding Elements](https://guide.coherent-labs.com/layout-assets-and-styling/styling--scalability/dom-management/index.html.md): Learn how to choose the right hiding technique for each use case, defer heavy DOM branches to reduce startup cost, pool reusable nodes to eliminate garbage collection spikes, and throttle DOM mutations to keep the layout tree quiet. - [Handling Aspect Ratios with Media Queries](https://guide.coherent-labs.com/layout-assets-and-styling/styling--scalability/handling-aspect-ratios-with-media-queries/index.html.md): Learn how to use CSS media queries to adapt your game UI for different screen shapes, from 16:9 TVs to 21:9 ultrawide monitors and 16:10 handhelds. - [Writing Maintainable & High-Performance CSS](https://guide.coherent-labs.com/layout-assets-and-styling/styling--scalability/writing-maintainable-css/index.html.md): Learn how to structure your stylesheets for maximum performance in Gameface using flat selectors, the BEM methodology, and preprocessors like SASS. - [Auto-Scaling & Complex Text](https://guide.coherent-labs.com/layout-assets-and-styling/texts--fonts/auto-scaling-text/index.html.md): Configure dynamic font resizing and Right-to-Left (RTL) text layouts to support localized content. - [Building Rich Text: Inline Layouts & Emojis](https://guide.coherent-labs.com/layout-assets-and-styling/texts--fonts/building-rich-text/index.html.md): Learn how to seamlessly mix text, UI icons, and emojis in Gameface using the custom cohinline layout and modern font fallbacks. - [Importing Fonts & Styling Text](https://guide.coherent-labs.com/layout-assets-and-styling/texts--fonts/importing-fonts-and-styling-text/index.html.md): Learn how to load custom fonts, create readable HUD text effects, and manage Right-to-Left languages in Gameface. ## Logic and interactions - [Custom Data-Bind Attributes](https://guide.coherent-labs.com/logic-and-interactions/data-binding--ui-state/custom-data-bind-attribute/index.html.md): Learn how to extend Gameface's data-binding system by creating custom attribute handlers with init, update, and deinit lifecycle methods, and understand when custom attributes are worth the performance trade-off. - [Data-Binding Basics: Values, Styles, and Classes](https://guide.coherent-labs.com/logic-and-interactions/data-binding--ui-state/data-binding-basics/index.html.md): Learn how Gameface's declarative data-binding system connects model properties to the DOM using special HTML attributes for text content, inline styles, dynamic CSS classes, and conditional class toggling, all without writing manual DOM manipulation code. - [Local State vs. Game State](https://guide.coherent-labs.com/logic-and-interactions/data-binding--ui-state/local-vs-game-state/index.html.md): Learn how to partition UI state between the frontend and the game backend to minimize communication overhead and maximize performance. - [Observable Models & Virtual Lists](https://guide.coherent-labs.com/logic-and-interactions/data-binding--ui-state/observable-models-and-virtual-lists/index.html.md): Learn how observable models automate synchronization by tracking property changes, how synchronization dependencies keep linked models in lockstep, and how virtual lists paginate large arrays without generating thousands of DOM nodes. - [Structural Binding & UI Events](https://guide.coherent-labs.com/logic-and-interactions/data-binding--ui-state/structural-data-binding/index.html.md): Learn how to conditionally show and hide elements with data-bind-if, generate repeated DOM from arrays with data-bind-for, and attach event handlers directly through data-binding attributes. - [Engine Communication: Setup & Events](https://guide.coherent-labs.com/logic-and-interactions/engine-communication--data-mocking/engine-communication/index.html.md): Learn how to initialize the Gameface engine bridge safely, subscribe and clean up events, and choose between trigger and call patterns with practical mock-driven workflows. - [Mocking Data Models](https://guide.coherent-labs.com/logic-and-interactions/engine-communication--data-mocking/mocking-data/index.html.md): Learn how to develop and test your Gameface UI without a running game engine by mocking data models, events, and calls entirely in JavaScript. - [Drag & Drop: Mouse vs. Gamepad](https://guide.coherent-labs.com/logic-and-interactions/interactions/drag-and-drop/index.html.md): Build drag-and-drop in Gameface from pointer events or the Interaction Manager's dropzone module for mouse input, then layer on a carry-mode state machine so gamepad players who have no cursor can pick up, move, and drop with two button presses. - [Interaction Manager: Keyboard & Gamepad Input](https://guide.coherent-labs.com/logic-and-interactions/interactions/interaction-manager/index.html.md): Learn how to add keyboard and gamepad support to your Gameface UI using the Interaction Manager library, including named actions for sharing handlers across inputs, key combinations, hold types, and analog stick bindings. - [Routing Input: UI vs. The 3D World](https://guide.coherent-labs.com/logic-and-interactions/interactions/routing-input/index.html.md): Learn how to manage input routing between your Gameface UI and the 3D game world, including custom cursors and text selection. - [Spatial Navigation & Focus Management](https://guide.coherent-labs.com/logic-and-interactions/interactions/spatial-navigation-and-focus/index.html.md): Use the Interaction Manager spatial navigation module to drive HTML focus with arrow keys or a gamepad D-Pad, scope focus to areas, and style the focused element clearly enough that gamepad players never lose their place. - [Touch Support & Mobile Inputs](https://guide.coherent-labs.com/logic-and-interactions/interactions/touch-support/index.html.md): Handle mobile interactions in Gameface using standard DOM touch events or the Interaction Manager touchGestures module for complex patterns. ## Planning and setup - [Overview](https://guide.coherent-labs.com/planning-and-setup/alternative-frameworks/overview/index.html.md): Coherent Labs maintains ready-to-use Gameface starter templates for React, Vue, Preact, and Svelte, each pre-configured with our tooling so you can build UIs in the framework your team already knows. - [Preact](https://guide.coherent-labs.com/planning-and-setup/alternative-frameworks/preact/index.html.md): Scaffold a Gameface-ready Preact 10, TypeScript, and Vite project with the create-gameface-app template, then learn the Preact-specific caveats for the Player. - [React](https://guide.coherent-labs.com/planning-and-setup/alternative-frameworks/react/index.html.md): Scaffold a Gameface-ready React 19, TypeScript, and Vite project with the create-gameface-app template, then learn the React-specific caveats for the Player. - [Svelte](https://guide.coherent-labs.com/planning-and-setup/alternative-frameworks/svelte/index.html.md): Scaffold a Gameface-ready Svelte 5, TypeScript, and Vite project with the create-gameface-app template, then learn the Svelte-specific caveats for the Player. - [Vue](https://guide.coherent-labs.com/planning-and-setup/alternative-frameworks/vue/index.html.md): Scaffold a Gameface-ready Vue 3, TypeScript, and Vite project with the create-gameface-app template, then learn the Vue-specific caveats for the Player. - [Asset Preloading & Bundler Config](https://guide.coherent-labs.com/planning-and-setup/asset-preloading/index.html.md): Learn how Gameface's Instaload caching system works, why inline assets silently break single-frame loading, and how to configure Vite to produce engine-compatible build output. - [Figma Exporter](https://guide.coherent-labs.com/planning-and-setup/design-work/figma-exporter/index.html.md): Use the Coherent Gameface Exporter Figma plugin to convert design frames into Gameface-compatible HTML and CSS. Learn how to install it, export a frame, and understand its intended scope and limitations. - [Development Environment & Tools](https://guide.coherent-labs.com/planning-and-setup/development-environment-and-tools/index.html.md): Configure your workspace with the essential editor plugins, linters, and workflow practices required for Gameface development. - [Performance Defaults](https://guide.coherent-labs.com/planning-and-setup/performance-defaults/index.html.md): Ten architectural decisions to make before you write UI code, so that the expensive problems never get built in. Each one links to the article that argues for it in full. - [Prototyping and Developing (Gameface UI)](https://guide.coherent-labs.com/planning-and-setup/prototyping-and-developing/index.html.md): An introduction to the Gameface UI boilerplate, its structure, and how it accelerates your UI development. - [Recommended Tech Stack Overview](https://guide.coherent-labs.com/planning-and-setup/recommended-tech-stack/recommended-tech-stack-overview/index.html.md): Discover the core technologies behind Gameface UI development. Learn why we recommend SolidJS, Vite, SCSS, and TypeScript for maximum game UI performance. - [Setting up the Gameface Stack](https://guide.coherent-labs.com/planning-and-setup/recommended-tech-stack/setting-up-the-gameface-stack/index.html.md): Learn how to scaffold a modern Vite + SolidJS project and configure it to run perfectly within the Gameface engine. - [Prototyping an Inventory Screen - Part 1: Assets and Layout](https://guide.coherent-labs.com/planning-and-setup/the-prototyping-workflow/prototyping-an-inventory-part-one/index.html.md): Learn how to quickly prototype an inventory screen using the Gameface UI boilerplate. In this first part, we will set up the project, create a new view, and build the basic layout using pre-built components. - [Prototyping an Inventory Screen - Part 2: UI Components & Interactivity](https://guide.coherent-labs.com/planning-and-setup/the-prototyping-workflow/prototyping-an-inventory-part-two/index.html.md): Breathe life into your inventory prototype by adding interactive Gameface UI components, styling active states, and extracting logic into custom components. - [Section Overview: Prototyping an Inventory](https://guide.coherent-labs.com/planning-and-setup/the-prototyping-workflow/section-overview/index.html.md): Learn the core principles of Gameface UI by translating a structural wireframe into an interactive prototype. ## Polishing - [Custom Inspector Tools](https://guide.coherent-labs.com/polishing/debugging-profiling--testing/custom-tools/index.html.md): Learn to use Gameface's proprietary DevTools panels: the Cohtml panel for visual GPU debugging and the Data Binding inspector for tracking model subscriptions and testing UI state in isolation. - [Debugging Tools & VS Code Integration](https://guide.coherent-labs.com/polishing/debugging-profiling--testing/debugging-tools/index.html.md): A practical guide to Gameface's DevTools panels, how to attach Visual Studio Code directly to the Player for breakpoint debugging, and the inline source map workaround required by the coui:// protocol. - [Layout Debugging: Computed Styles & Immediate Layout](https://guide.coherent-labs.com/polishing/debugging-profiling--testing/layout-debugging/index.html.md): Understand Gameface's dual-tree layout model, why getComputedStyle returns empty values on load, how to safely defer style reads, and when to use engine.enableImmediateLayout as a last resort. - [Performance & Memory Profiling](https://guide.coherent-labs.com/polishing/debugging-profiling--testing/performance-and-memory-profiling/index.html.md): Learn to record and read Gameface's Performance tab timeline markers, connect GPU draw calls back to DOM nodes, detect texture thrashing via object counters, and interpret Scratch Texture Manager charts. - [UI Testing: Gameface E2E](https://guide.coherent-labs.com/polishing/debugging-profiling--testing/ui-testing/index.html.md): Set up and write automated end-to-end tests for Gameface UIs using the official gameface-e2e framework: element queries, interaction simulation, data binding mocking, gamepad input, and async element assertions. - [Advanced Visuals: Partitioning & Filters](https://guide.coherent-labs.com/polishing/gameface-specific-features/advanced-visuals/index.html.md): Apply CSS backdrop-filter to blur the live 3D scene behind UI panels, and use surface partitioning to split a HUD into individual textures for significant memory savings at 4K resolutions. - [The Compositor & 3D UI](https://guide.coherent-labs.com/polishing/gameface-specific-features/compositor/index.html.md): Use the coh-composition-id CSS property to detach a UI element from the flat render surface and let the game engine place it anywhere in 3D world space - on terminals, screens, and any in-world geometry. - [Live Views: Streaming 3D to 2D](https://guide.coherent-labs.com/polishing/gameface-specific-features/live-views/index.html.md): Display real-time engine render targets - character portraits, 3D minimaps, item previews - directly inside HTML elements as dynamically updating textures. - [ARIA Plugins](https://guide.coherent-labs.com/polishing/localization--accessibility/accessibility/aria-plugins/index.html.md): A practical guide to Gameface's three pre-built ARIA accessibility plugins: CohtmlARIAHoverReadPlugin, CohtmlARIAFocusChangePlugin, and CohtmlARIALiveRegionsPlugin. Includes configuration, required HTML attributes, and a custom plugin example. - [Color Blindness & Theming](https://guide.coherent-labs.com/polishing/localization--accessibility/accessibility/color-blindness/index.html.md): Structure your SCSS and CSS custom properties so that colorblind-safe palettes can be activated with a single root class swap, without duplicating style logic. - [High Contrast Mode](https://guide.coherent-labs.com/polishing/localization--accessibility/accessibility/high-contrast-mode/index.html.md): Implement a high contrast mode for players with low vision using CSS custom properties and a root class toggle. Build a contrast-safe color palette that meets accessibility standards and provide an easy player toggle in the settings menu. - [Motion Sickness & Reduced Motion](https://guide.coherent-labs.com/polishing/localization--accessibility/accessibility/motion-sickness/index.html.md): Provide in-game options to reduce or disable UI animations, parallax, and motion effects for players sensitive to motion. Implement reduced-motion mode through class toggling and CSS animation control, without relying on OS-level media queries. - [Subtitles & Closed Captions](https://guide.coherent-labs.com/polishing/localization--accessibility/accessibility/subtitles-and-captions/index.html.md): Build a customizable subtitles and closed captions system in Gameface UI: synced timing, player-controlled font size and color, background opacity, and screen positioning. - [TTS Architecture](https://guide.coherent-labs.com/polishing/localization--accessibility/accessibility/tts-architecture/index.html.md): Understand Gameface's Text-to-Speech system: the three-component architecture, how the SpeechAPI JS library manages four priority channels, the full end-to-end request flow, and how to load and initialize the ARIA JS library in your UI. - [Native Localization & Dynamic CSS](https://guide.coherent-labs.com/polishing/localization--accessibility/localization/index.html.md): Use Gameface's native localization interface to translate UI strings directly from the game engine, handle dynamic locale changes, and apply CSS optimizations that prevent text overflow and enable language-specific style rules. - [The Performance Playbook](https://guide.coherent-labs.com/polishing/performance-playbook/index.html.md): Diagnose Gameface UI performance by symptom: slow loading, sluggish screen toggling, DOM cost, garbage collection stalls and expensive motion. Includes the browser habits that measurably do not apply here.