Use U.S. Web Design System for components and utility classes

  • Status: Accepted

  • Deciders: Loren Yu, Rocket Lee, Sawyer Hollenshead

Context and Problem Statement

Projects should avoid reinventing the wheel where possible. A common place to do this is in the UI, by using a design system for frontend components and utility classes. This can help avoid inconsistencies in the UI, and can reduce barriers for new developers.

We want to use a design system that is:

  • Section 508 compliant

  • Open source

  • Well maintained and documented

  • Includes the typical components and design patterns needed for government websites

Considered Options

Decision Outcome

The template will provide U.S. Web Design System styling out of the box.

We will not follow their install directions, which suggests using Gulp as a task runner. Instead, to reduce the number of dependencies and configuration, we'll leverage Next.js's and Storybook's built-in Sass support. Copying the USWDS static assets into the project will be handled by a postinstall script in package.json.

Positive Consequences

Negative Consequences

  • Unlike the CMS Design System, USWDS doesn't provide React components. Project teams will need to create their own React components that output USWDS markup, or install a third-party library like react-uswds. In the future, the template could include this library by default.

  • CMS projects may need to swap out USWDS for the CMS Design System, although the CMS Design System is based on USWDS, so this may not be necessary right away.

Last updated