On this page
- Define density by task rather than screen size
- Choose which dimensions density may change
- Translate design measurements into a contract
- Test interaction and content at both densities
- Keep overrides from fragmenting the system
- Calculate a row without fixing its height
- Establish scope transitions deliberately
- Key takeaways
Design System Density Modes is most useful when it becomes a repeatable operating practice rather than an isolated cleanup. Consider a product team supporting both high-information and general-purpose workflows. The team needs a clear contract, an owner, and evidence that the result works for consumers. This guide turns density mode contracts into a bounded workflow with decisions you can record and revisit.
Define density by task rather than screen size
Density is not simply the desktop version of a component. A wide screen can still need comfortable controls, and a compact workspace can appear in a small window. Describe the tasks each mode supports and let the product choose deliberately. Avoid changing density automatically at a breakpoint unless research and product requirements justify that behavior. State whether users can select a preference and which team owns it.
Use the PX to REM Converter to check representative design measurements against the agreed root-size assumption. Record that assumption explicitly rather than treating the tool default as a universal browser setting. Converted values still need review with real content and user text settings.
Set a bounded pilot before changing the whole library. Choose one supported consumer, name the reviewer, and write the acceptance condition in observable terms. Keep the initial scope small enough that the same people can review both the proposal and the resulting implementation.
Choose which dimensions density may change
Contract review. List dimensions that can vary: internal spacing, row height, icon placement, and typography treatment where appropriate. Separate visual compression from interaction requirements. Shrinking a control visually does not remove the need to meet applicable target-size criteria or provide a usable focus indicator. Keep destructive actions, validation behavior, and labels semantically consistent across modes so density remains a presentation contract rather than a different workflow.
For a portable review record, start with explicit fields rather than a paragraph hidden in chat:
{
"density": "compact",
"rootPxAssumption": 16,
"rowMinRem": 2.25,
"scope": "workspace",
"fixedHeight": false
}This is an illustrative project record, not an industry interchange format. Add stable identifiers and private source references in your own tracker when they help maintainers verify the evidence.
Translate design measurements into a contract
Implementation evidence. Record measurements in design units and implementation units with an explicit root-size assumption. Rem values help respect user text settings, but not every geometric value must use the same unit. Define a small role set rather than duplicating every spacing number with a compact suffix. Review whether component dimensions should be minimums instead of fixed heights when text wraps or the user increases font size.
Consult MDN custom properties guide for the underlying platform or workflow details. Verify the version and capabilities your team actually uses. External guidance establishes technical behavior; your own documentation must still explain which subset the shared system supports and who approves changes to it.
Test interaction and content at both densities
Consumer validation. Use the same realistic dataset in both modes. Include long names, localized labels, validation messages, row actions, and mixed content. Test keyboard navigation and visible focus at compact spacing. Check whether truncated information has an accessible alternative and whether line wrapping preserves meaning. A denser table that fits more rows but hides every distinguishing label may reduce useful information rather than increase it.
Use WCAG 2.2 as a reference for the relevant standards or tooling, not as a substitute for checking your implementation. Record at least one ordinary case and one boundary case. When a result differs from the contract, identify whether the specification, example, or implementation should change before approving the work.
Keep overrides from fragmenting the system
Maintenance ownership. Apply density through a documented scope, with a defined strategy for menus and overlays rendered elsewhere in the document. Avoid mixing compact rows with comfortable embedded controls unless the combination is intentionally supported. Require local exceptions to state their reason and owner. Review recurring exceptions as evidence that the shared mode needs improvement, rather than letting arbitrary per-screen padding rules become a second undocumented density system.
Keep the review artifact beside the work it governs. Storybook documentation can support the documentation or implementation process, while Design Systems guides provide broader operating context. Use the development directory for adjacent implementation resources. Revisit the decision when a supported consumer exposes a concrete limitation, not merely because a new naming preference appears.
Calculate a row without fixing its height
Take a comfortable data row with a 24-pixel line box and 10 pixels of block padding on each side. Its single-line content needs 44 pixels before borders. A compact variant with 6-pixel block padding needs 36 pixels. At an assumed 16-pixel root, those padding values become 0.625rem and 0.375rem. These are illustrative design choices, not universal density standards. Keep the content line height readable and obtain most compression from surrounding space before considering smaller text.
Use the result as a minimum rather than an absolute height. A two-line customer name should expand the row instead of colliding with the next record. Account for embedded controls separately: a checkbox or action button may impose a larger minimum than the text. Do not shrink its actual interactive area merely to preserve the arithmetic. Review the applicable target-size requirements and the spacing between neighboring actions in the rendered interface.
Now repeat the fixture with increased default text size and a long translated status. The important outcome is that content remains distinguishable, controls remain reachable, and row boundaries remain clear. Matching the original row count is secondary. Document any intentionally truncated column and how users can access the full value.
Establish scope transitions deliberately
A workspace may contain a compact results table beside a comfortable editing form. Put density boundaries around those tasks rather than applying scattered padding overrides to individual descendants. Define what happens when a row opens an editor: the dialog can intentionally use comfortable spacing, but that choice should be a documented product rule rather than an accident of its portal location.
Add paired examples to the library showing the same component in each supported mode. Review error text, empty states, loading placeholders, and action menus alongside ordinary rows. When a new component cannot support compact mode safely, publish that limitation and its fallback. An explicit unsupported mode is easier to maintain than a visually compressed variant with untested behavior.
Key takeaways
- Define the scope and owner of density mode contracts before implementation.
- Start with a representative consumer and explicit acceptance evidence.
- Separate policy decisions from what a formatter, generator, or test can prove.
- Review boundary cases and document intentional exceptions.
- Keep the supported contract, examples, and release guidance aligned.
Reach designers & developers at work
Put your product next to the tools people use every day. One sponsor per placement, no tracking pixels.
Become a sponsor