Skip to main content
GOV UI Lightweight UI for government software.

Install

GOV UI ships a plain stylesheet and a UMD script. Neither requires a bundler, because many of the projects this system targets do not have one.

Plain HTML

The primary path. Two tags, no build step:

<link rel="stylesheet" href="gov-ui.css">
<script src="gov-ui.js" defer></script>

<button class="gov-button gov-button--primary gov-button--md" type="button">Save</button>

Components initialize themselves from data-gov-module attributes. There is no wiring code to write.

Every v0.1 component is plain semantic HTML and needs no JavaScript at all. The script matters from v0.3, when the interactive components land.

React

npm install @gov-ui/react @gov-ui/css
import { Button } from "@gov-ui/react";

export function SaveAction() {
  return <Button>Save</Button>;
}

Server-rendered frameworks

Adapters emit exactly the markup in the plain-HTML example. They carry no styles and no behavior of their own — anything else in an adapter is a bug.

<!-- .NET Razor -->
<gov-button variant="primary">Save</gov-button>

<!-- Django -->
{% gov_button variant="primary" %}Save{% endgov_button %}

<!-- Laravel Blade -->
<x-gov-button variant="primary">Save</x-gov-button>

The adapters are not built yet. They land after the interaction milestone, so they have a stable contract to conform to. Django goes first.

Support tiers

Published so expectations are honest. Five ecosystems is real maintenance surface, and implying that all of them get equal attention would be a promise this project cannot keep.

Support tiers
Tier What Channel
1 — coregov-ui.css + gov-ui.jsCDN, zip, npm
1 — core@gov-ui/reactnpm
2 — adapter.NET Razor tag helpersNuGet
2 — adapterDjango template tagsPyPI
2 — adapterLaravel Blade, Symfony TwigPackagist
3 — documentedWordPress pluginWordPress.org