This style guide will show you how to develop in terra according to our UI and UX guidelines. It is an evolving and changing document.
Our vision for a good UI consists of the following pillars.
Some basic principles before you dive deep into the best practices section.
We provide a collection of our components to create mockups and interactive prototypes using Adobe XD. Use it before starting development to avoid unnecessary workload.
Add
var(--color-group-add)
#6AD26A
Alert
var(--color-group-alert)
#F11539
Warning
var(--color-group-warning)
#ff873e
Action
var(--color-group-action)
#ffdb4c
Active
var(--color-group-active)
#24B3E0
Info
var(--color-group-info)
#3f54d0
Transfer
var(--color-group-info)
#e468f3
Navigation
var(--color-group-navigation)
#636671
Disabled
var(--color-group-disabled)
#D7D8DB
Color Structure 0
var(--color-structure-0)
#FFFFFF
Color Structure 1
var(--color-structure-1)
#F5F5F5
Color Structure 2
var(--color-structure-2)
#E9EAEC
Color Structure 3
var(--color-structure-3)
#E5E5E5
Color Structure 4
var(--color-structure-4)
#D7D8DB
Color Structure 5
var(--color-structure-5)
#C6C7CA
Color Structure 6
var(--color-structure-6)
#ACADB2
Color Structure 7
var(--color-structure-7)
#95989D
Color Structure 8
var(--color-structure-8)
#7B7E85
Color Structure 9
var(--color-structure-9)
#636671
Color Structure 10
var(--color-structure-10)
#5B5D66
Color Structure 11
var(--color-structure-11)
#494C56
Color Structure 12
var(--color-structure-12)
#2F323A
Color Structure 13
var(--color-structure-13)
#000000
Roboto is set globally as standard font. Icons can be set by following this instruction: Icon tutorial. For a complete list of all icons see here: Icon-List
Roboto - var(--font-family)
Icons ☆ - var(--font-family-icons)
Font Size 1 (11px) - var(--font-size-1)
Font Size 2 (12px) - var(--font-size-2)
Font Size 3 (13px) - var(--font-size-3)
Font Size 4 (14px) - var(--font-size-4)
Font Size 5 (16px) - var(--font-size-5)
Font Size 6 (20px) - var(--font-size-6)
Font Size 7 (28px) - var(--font-size-7)
Font Size 8 (48px) - var(--font-size-8)
Font Weight 1 (400) - var(--font-weight-1)
Font Weight 2 (500) - var(--font-weight-2)
Font Weight 3 (700) - var(--font-weight-3)
Almost all paddings, margins and heights should have these variables as values. Consider that in compact mode these values will be cut in half.
Space XS (2px) - var(--space-xs)
Space SM (4px) - var(--space-sm)
Space MD (8px) - var(--space-md)
Space LG (12px) - var(--space-lg)
Space XL (24px) - var(--space-xl)
Height SM (24px) - var(--space-SM)
Height MD (36px) - var(--space-MD)
Height LG (48px) - var(--space-LG)
These are the standard values for the following parameters and they should suffice for almost any case.
Border Radius (2px) - var(--border-radius)
Box Shadow (0 1px 2px 0 rgba(0,0,0,0.2)) - var(--box-shadow)
z-Index (100, 200... - 900) - var(--zIndex-1) - var(--zIndex-9)
Transition (0s) - var(--transition-0)
Transition (ease 0.2s) - var(--transition-xs)
Transition (ease 0.3s) - var(--transition-sm)
Transition (ease 0.4s) - var(--transition-md)
Transition (ease 0.6s) - var(--transition-lg)
Transition (ease 1.2s) - var(--transition-xl)
Transition Delay (0s) - var(--transition-delay-0)
Transition Delay (0.2s) - var(--transition-delay-xs)
Transition Delay (0.3s) - var(--transition-delay-sm)
Transition Delay (0.4s) - var(--transition-delay-md)
Transition Delay (0.6s) - var(--transition-delay-lg)
Transition Delay (1.2s) - var(--transition-delay-xl)
Usually, the solution for an existing problem just requires a quick look at the existing approaches. These selected case studies will help you not to reinvent the wheel every day and at the same time they enable our users a consistent working method within our interfaces.
Do
Headings consist of h1 elements and should be aligned left to their content.
Don't
h2 elements are reserved for portlet header.
Do
Buttons look awesome inside the toolbar!
Don't
Most other elements clearly do not. (Also check button-toggle)
Do
Always on top, always visible!
Don't
Just don't use it anywhere else.
Do
Save goes left and is always first. Delete goes right and is always last.
Don't
Don't group, don't swap positions.
Do
Order your buttons. Use groups where it makes sense.
Don't
Don't place buttons randomly.
Do
Portlet in portlet is fine.
Don't
Portlet in portlet in portlet is not.
Do
Always wrap input elements in a portlet.
Don't
Never place inputs on plain background.
Do
Group buttons in the last column.
Don't
Don't spread them over the entire table.
Do
Use overlays to draw attention and display important stuff!
Don't
Don't use overlays to display functionality that you couldn't fit anywhere else. (Also check #input-wrapping).
Do
Use the toggle element to display different button states.
Don't
Don't abuse regular buttons to achieve different states.
Do
Try to use self-explanatory icons. Always use tooltips.
Don't
Don't use similar icons for different functionalities. Never use an icon twice within the same toolbar.
Do
Resolution: 160px × 160px
Format: svg or png with a transparent background
For functional icons (like upload) we recommend the use of plentyicons with #494c56 (color-structure-11) as icon color.
Don't
Please, don't do this.
Do
All 'inputListBoxValues' have to be sorted.
Use the selectSort pipe in order to sort in the template or use the SortHelper for sorting in the TypeScript file.
Don't
Don't use in-place array operations like push() or pop().
These operations don't update the array instance and angular's change detection doesn't recognize it. Instead, you have to use methods that return a new array reference, e.g. concat().