Designers and developers should refer to system elements by the same names. This guide shows you how to call out MDS vs. custom components within visual designs.
Whenever possible, specify typography by referencing the text style mixins on the Typography page. Mixins apply many different styles to text, including color, font weight, font size, and line height.
Mixin name on the Typography page.
Override text styles (both body text and headings) as bolded by adding the text weight constant to your annotation, i.e., Mixin: level-3-heading, $mds-text-weight-bold.
Apply bolding to any typography mixin.
To meet accessibility color contrast requirements, use only MDS text colors and their constants, i.e., $mds-text-color-error-on-light.
UI Components
Always specify UI Components by name and, when applicable, size and variation, i.e., MDS Button Medium Primary, MDS List Group Small.
Annotating components.
Optionally, consider including links to relevant component documentation pages. Links within PDFs are automatically clickable.
Include a link in your annotations for quick access to component pages.
Use an Icon-Only Button group to create a toolbar of icons.
Space
Use the constants on the Space page to annotate space between elements.
The most common spaces used will be stack, for adding space to the bottom of an element, and inline, for adding space to the left or right of an element.
Use inline-left spacing to separate inline elements flowing together from the left edge. This applies right margin to each item. The opposite is true for inline-right.
Currently the MDS spatial model is tailored to the space within components, so the increments are small and not always sufficient for composing a page layout. When spacing out elements more than 16px, specify the space in increments of 8px, i.e., 24, 32, 40, etc.
A combination of MDS Space constants and custom space.
Always attempt to use the methods above to specify as much of the design as possible.
If your design extends beyond what MDS offers, use the base Constants to specify as many details as possible.
Label custom design details in annotations, and consider using a different color to signal custom work, as this may help developers better size styling efforts.
Additional Resources
Sketch Measure Plugin
The Sketch Measure plugin automatically generates the yellow-background annotations in the above examples. By labelling layers with design details, this feature allows you to quickly generate annotated specifications.
3. Select the object to annotate, and choose the positioning of the annotation.
4. Choose only “Layer name” and click the blue checkmark button to create the annotation.
InVision Inspect
Using the InVision Inspect tool allows an engineer to view all of the details of an uploaded .sketch file. Identify MDS components and constants by naming the layers in your Sketch file with MDS component and constant names.