Treat constraints as a design tool, not as a limitation to work around, explicit constraints reduce ambiguity, guide decision-making, and prevent the gradual erosion of the system.
In the absence of clearly defined constraints, teams tend to:
- improvise solutions,
- stretch components beyond their intended purpose,
- and introduce inconsistencies that are difficult to detect and even harder to remove.
A constraints-driven system makes boundaries visible.
It defines not only what is possible, but also what is intentionally unsupported, allowing teams to move faster and with greater confidence.
- Constraints are most effective when they are:
- explicit,
- documented,
- and enforced by the system itself.
Limited and intentional component APIs
Components were designed with intentionally constrained APIs to prevent misuse and uncontrolled variation.
animating animating animation animation backdrop backdrop opened opened overflow overflow position position mdsModalClose void mdsModalHide void --mds-modal-custom-closed-transform --mds-modal-custom-window-distance --mds-modal-overlay-color --mds-modal-overlay-opacity --mds-modal-transition-duration --mds-modal-transition-timing-funciton --mds-modal-window-background --mds-modal-window-distance --mds-modal-window-max-width --mds-modal-window-min-width --mds-modal-window-overflow --mds-modal-window-radius --mds-modal-window-shadow --mds-modal-z-index Design tokens as enforced boundaries
Design tokens were used to encode visual constraints directly into the system.
w-1000 40px 2.5rem w-1100 44px 2.75rem w-1200 48px 3rem w-1300 52px 3.25rem w-1400 56px 3.5rem Composition rules instead of free assembly
Composable components were governed by explicit composition rules.
Documentation from codebase
// StencilJS component documentation
/**
* @slot default - Add `text string`, `HTML elements` or `components` to this slot.
* @slot action - Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element.
*/
Component composition
<mds-modal>
<mds-banner
headline="Modal title"
icon="mi/outline/info"
slot="window"
tone="weak"
variant="primary"
>
<mds-text typography="caption">This is a modal text content.</mds-text>
<mds-button
icon="mi/outline/email"
slot="action"
tone="strong"
variant="primary"
>
Proceed
</mds-button>
</mds-banner>
</mds-modal>
Accessibility constraints as non-negotiable
Accessibility requirements were encoded as hard constraints rather than guidelines.
Use tab to navigate
System-level defaults over local overrides
Defaults were treated as part of the system's contract.
Using component attributes as defaults
<mds-modal
headline="Modal title"
icon="mi/outline/info"
tone="weak"
variant="primary"
>
<mds-text typography="caption">This is a modal text content.</mds-text>
<mds-button
icon="mi/outline/email"
slot="action"
tone="strong"
variant="primary"
>
Send email
</mds-button>
</mds-modal>
Skipping attributes for out of scope customization
<mds-banner
icon="mi/outline/info"
class="bg-tone-neutral text-tone-neutral-01 fill-variant-primary-03"
>
<mds-text typography="caption">This is a modal text content.</mds-text>
<mds-button
icon="mi/outline/email"
slot="action"
class="bg-variant-primary-03 fill-tone-neutral text-variant-primary-10"
>
Send email
</mds-button>
</mds-banner>
Explicit "out of scope" decisions
Some use cases were intentionally excluded from the system.
Design system documentation
Constraints are what make systems scalable and trustworthy, they reduce cognitive load, prevent entropy, and make correct usage the easiest path.
A design system without constraints is based on uncontrolled design freedom, it is fragile, establishing constraints intentionally enables creativity within safe and predictable boundaries.