the Chromium logo

The Chromium Projects

Creating Chrome WebUI Interfaces

General guidelines

When creating or modifying WebUI resources, follow the Web Development Style Guide. Note that most WebUI code is using TypeScript, and any new additions must use TypeScript.

A general explanation of how WebUI works, including the interaction between C++ and TypeScript code, can be found in the WebUI Explainer.

Shared, cross-platform resources can be found in ui/webui/resources.

Creating a new WebUI

There are a few questions to answer before creating a new WebUI:

For user visible UIs, most or all of these questions will typically be anwswered during the feature launch process. For debug UIs, expect to address these questions during code review.

A detailed example of how to create a WebUI in can be found at Creating WebUI interfaces in chrome.

If you need additional information on how to set up the BUILD.gn file to build your WebUI, there is detailed information and additional examples for BUILD files specifically at WebUI Build Configurations.