Skip to main content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Latest release: Component Library: v56.6.1 released on Jun 9, 2026 | Guidance: Sprint 1 released on Jun 16, 2026 | Figma: Changelog

Components

Modal - Design decisions

Key design decisions for the Modal component.

What is an ADR?

We use the ADR (Architecture Decision Record) to structure design decision documentation. Each ADR covers three things: the context that prompted the decision, the decision itself, and its consequences — including trade-offs and any open questions.

ADR 001 - Modal button sizing and layout

  • Date raised: February 9, 2026
  • Decision date: February 9, 2026

Context

We want modal buttons to:

  • Be easy to tap on small screens
  • Avoid awkward wrapping for long labels
  • Look appropriately sized on larger modals and viewports

Previously, buttons:

  • Were full-width on mobile (good for tap targets)
  • Switched to side-by-side at larger breakpoints
  • Could become very wide in large modals, causing short labels to look stretched and long labels to wrap in unbalanced ways

Decision

We adopted a responsive footer layout and sizing pattern:

  1. Default behavior (all modals) — Buttons are always full-width and vertically stacked. This maximizes tap area and keeps widths consistent when button label lengths vary.

  2. Large modal behavior (on wider viewports) — For large modals (.va-modal--lg) at medium-screen and above, the buttons layout in a row. Buttons remain sized to the width of their labels. This lets buttons size to their label text and avoids excessively wide buttons.

  3. Long label handling — Buttons use overflow-wrap: anywhere so long words (string of characters) wrap instead of overflowing. This keeps the modal layout intact even when labels are longer than expected. This works alongside existing content guidance, which recommends keeping labels to 35 characters.

Edit this page in GitHub (Permissions required)
Last updated: May 15, 2026