@okonetchnikov
UI developer with an experience in both
design and development who specializes in
interaction design, design systems and
modern frontend development.
Slide 4
Slide 4 text
UI engineer working with web
technologies since 1999. Creator of react-
styleguidist and component-driven-
development
@iamsapegin
Slide 5
Slide 5 text
bit.ly/cddwrkshp
Workshop GitHub page
Slide 6
Slide 6 text
What’s on your mind?
Slide 7
Slide 7 text
Plan for today
Slide 8
Slide 8 text
Plan for today
✓ DS theory
✓ UI Inventory
✓ Introduction to CDD
✓ Design Tokens
✓ UI Primitives
✓ Layout & Whitespace Management
✓ UI Composition
Slide 9
Slide 9 text
Design language
Typography Color
Spacing
UX
Slide 10
Slide 10 text
No whitespace Added whitespace
Typography
Slide 11
Slide 11 text
Low contrast High contrast
Color
Slide 12
Slide 12 text
Spacing
No structure Structured content
Slide 13
Slide 13 text
Design language
• Establishes the brand
• Adds consistency
• Improves accessibility
Slide 14
Slide 14 text
Brand
Slide 15
Slide 15 text
Dropbox Yandex.Disk
Brand
Slide 16
Slide 16 text
Consistency
Slide 17
Slide 17 text
Accessibility
Slide 18
Slide 18 text
Accessibility
Slide 19
Slide 19 text
How do we enforce
design language?
Slide 20
Slide 20 text
Design Systems
Slide 21
Slide 21 text
“Design system defines a set of design-
related rules as a system of instructions
that can be re-used across single or
multiple products”
Slide 22
Slide 22 text
German government vs Austrian government
Slide 23
Slide 23 text
German federal government web-sites
Slide 24
Slide 24 text
German federal government web-sites
Slide 25
Slide 25 text
German federal government web-sites
Slide 26
Slide 26 text
Design system
Slide 27
Slide 27 text
Austrian federal government web-sites
Slide 28
Slide 28 text
Austrian federal government web-sites
Slide 29
Slide 29 text
Austrian federal government web-sites
Slide 30
Slide 30 text
Austrian federal government web-sites
Slide 31
Slide 31 text
No design system
Slide 32
Slide 32 text
Component-driven
Design Systems
Slide 33
Slide 33 text
The Process
1. Analyze & Plan
2. Execute
3. Maintain
4. PROFIT!
Slide 34
Slide 34 text
1. Analyze & Plan
Slide 35
Slide 35 text
Where to start
1. Analyze & find problems (UI Inventory)
2. Document
3. Plan
4. Execute!
Slide 36
Slide 36 text
UI inventory process
Slide 37
Slide 37 text
UI inventory process
Slide 38
Slide 38 text
UI inventory process
Slide 39
Slide 39 text
UI inventory process
Slide 40
Slide 40 text
Document
Slide 41
Slide 41 text
Plan
Slide 42
Slide 42 text
https://bit.ly/2U3hdss
Slide 43
Slide 43 text
2. Execute
Building styleguides
Slide 44
Slide 44 text
Styleguides
Slide 45
Slide 45 text
“Styleguide is a collection of rules,
patterns and components that are re-
usable across single or multiple
products.”
Good styleguides
• A common language for designers, developers, PMs
• Easy to use: good structure + relevant content
• Styleguide = documentation
• Easy to create & maintain
• Always up-to-date
Slide 57
Slide 57 text
Styleguide generators
Slide 58
Slide 58 text
No content
Slide 59
Slide 59 text
https://storybook.js.org
Slide 60
Slide 60 text
No content
Slide 61
Slide 61 text
https://www.catalog.style
Slide 62
Slide 62 text
react-cosmos
Slide 63
Slide 63 text
https://github.com/react-cosmos/react-cosmos
Slide 64
Slide 64 text
No content
Slide 65
Slide 65 text
https://react.feedly.com
Slide 66
Slide 66 text
npm start
Slide 67
Slide 67 text
Directory structure for component-driven development
Slide 68
Slide 68 text
Design Tokens
Slide 69
Slide 69 text
–https://www.lightningdesignsystem.com/design-tokens/
“Design tokens are the visual design
atoms of the design system —
specifically, they are named entities that
store visual design attributes”
Slide 70
Slide 70 text
Typography scale
a a a a a a a a a a a a a a a a a
Slide 71
Slide 71 text
http://webtypography.net/3.1.1
Slide 72
Slide 72 text
Naming
• x-small small medium large x-large
• xs, sm, md, lg, xl
• xs s m l xl
• 0, 1, 2, 3, 4, 5
• alpha beta gamma delta epsilon
Slide 73
Slide 73 text
Linear progression Geometric progression
Spacing scale
Slide 74
Slide 74 text
Spacing
Slide 75
Slide 75 text
https://design.lyft.com/re-approaching-color-9e604ba22c88
Color palettes
Slide 76
Slide 76 text
https://www.colorbox.io
Slide 77
Slide 77 text
https://colorsnapper.com
Slide 78
Slide 78 text
Color tokens
Slide 79
Slide 79 text
⚒ DesignTokens
Slide 80
Slide 80 text
UI Primitives
Slide 81
Slide 81 text
No content
Slide 82
Slide 82 text
Button
Slide 83
Slide 83 text
Label Button Icon
Input
Avatar
Slide 84
Slide 84 text
Label Button Icon
Input
Avatar
Slide 85
Slide 85 text
Login Form
Slide 86
Slide 86 text
Label Button Icon
Input
Avatar
Slide 87
Slide 87 text
Search Toolbar
Slide 88
Slide 88 text
Label Button Icon
Input
Avatar
Slide 89
Slide 89 text
⚒ Primitives
Slide 90
Slide 90 text
Component variations
Slide 91
Slide 91 text
Component variations
// Don't do this
// Impossible state!
Slide 92
Slide 92 text
Component variations
// Do this instead!
Slide 93
Slide 93 text
Accessing design tokens
// Hard coded value
styled.button`color: tomato;`
Slide 94
Slide 94 text
Accessing design tokens
// Value from the static imported theme
import {colors} from './theme.js';
styled.button`color: ${colors.primary};`
Slide 95
Slide 95 text
Accessing design tokens
// Value coming from the theme
styled.button`
color: ${props => props.theme.colors.primary};
`
Slide 96
Slide 96 text
Accessing design tokens
// Value coming from the theme
(shorthand)
import {themeGet} from 'styled-system';
styled.button`
color: ${themeGet('colors.primary')};
`
Slide 97
Slide 97 text
API for design tokens
import { color } from 'styled-system';
const Text = styled.p`${color};`
Text.defaultProps = {
color: 'primary'
}
// Renders text with primary color
// Renders text with secondary color
https://styled-system.com/how-it-works
Slide 98
Slide 98 text
⚒ Whitespace & Layout
Slide 99
Slide 99 text
UI Patterns
Slide 100
Slide 100 text
No content
Slide 101
Slide 101 text
–https://en.wikipedia.org/wiki/Design_pattern
“A design pattern is the re-usable form of
a solution to a design problem.”
Slide 102
Slide 102 text
A Pattern
Language: Towns,
Buildings,
Construction
Christopher Alexander
Patterns
• A great way to communicate
• Suitable for both designers & developers (and many
others)
• Solve particular design problems
• Re-usable
• …
Slide 106
Slide 106 text
3. Maintain
Slide 107
Slide 107 text
Process
Development Product
Design
Slide 108
Slide 108 text
Process
Product
Design & Development
Slide 109
Slide 109 text
Process
Product
Design & Development Styleguide
Slide 110
Slide 110 text
Process
Design & Development Design System
Slide 111
Slide 111 text
Process
Design & Development Design System
Slide 112
Slide 112 text
Benefits of CDD
• Develop in isolation
• Faster feedback loop
• See all possible states
• Easier to refactor
• Documentation!
Slide 113
Slide 113 text
Reasons for CDD
• A common language for designers & developers
• Enforce design language & design system
• Consistent UI
• Scales: single or multiple products
• Up-to-date documentation
Slide 114
Slide 114 text
How to start?
• Don’t ask for permission, just start!
• Make a thing
• Show it’s useful
• Commit!
Slide 115
Slide 115 text
Discussion
What problems are you facing…
Slide 116
Slide 116 text
Further reading
Slide 117
Slide 117 text
Atomic Design
Brad Frost
Slide 118
Slide 118 text
Design Systems
Alla Kholmatova
Slide 119
Slide 119 text
A Pattern
Language: Towns,
Buildings,
Construction
Christopher Alexander
Slide 120
Slide 120 text
The Elements of
Typographic
Style
Robert Bringhurst