Skip to content

Commit

Permalink
design token update
Browse files Browse the repository at this point in the history
  • Loading branch information
benediktgrether committed Jan 30, 2023
1 parent 516c796 commit 3a8efef
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
17 changes: 11 additions & 6 deletions docs/src/pages/concepts/design-tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ switchTheme: true

Design tokens are the overarching design characteristics required for creating and maintaining a design system. These are, for example, the basic values for spacing, border, colors, animations, etc., which are defined centrally and maintained independently of individual components.

## Design Tokens are

- Colors
- Dimension
- Sizing
- Spacing
- Shadows
- Borders
- Opacity
- Typography

## Why do we introduce semantic colors?

When developing UI elements, the definition of colors and their use plays a central role. For this purpose, the UX/UI designer defines a color palette and makes the information available to the developer.
Expand All @@ -21,12 +32,6 @@ By defining semantic colors, designers and developers speak the same language. F
Now, when talking about a particular element, everyone should also directly know its color role as well as its interactivity. This is to prevent an element from accidentally having a different hover color than all other elements with the same color role.
Another advantage of semantic colors is that new designers and developers can more quickly understand the structure of components and how they are built.

## How are the semantic colors composed?

The semantic colors are composed as follows.

The colors are composed as follows.

<Preview>
<SemanticColorsDemo />
</Preview>
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,17 @@ export const textColors = {
link: colors.blue60,
},
};

export const uiColors = {
page: {
background: colors.gray10,
foreground: colors.gray00,
},
};

export const boxShadows = {
boxShadow: {
soft: '0 4px 4px rgba(210, 210, 210, .25)',
medium: '0 4px 4px rgba(165, 165, 165, .25)',
},
};
2 changes: 1 addition & 1 deletion themes/theme-b2b/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
secondaryColors,
disabledColors,
statusColors,
} from './semantic-colors';
} from './design-token';

export const webFontUrl = [
'https://fonts.bunny.net/css?family=inter:400,600,700',
Expand Down

0 comments on commit 3a8efef

Please sign in to comment.