0.9.1 • Published 5 years ago

sds-design-token v0.9.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

SDS Design Tokens

SDS Design Tokens is an experimental project to generate design-tokens to create UI components with some base specific design system

Getting Started

npm i sds-design-token --save
yarn add sds-design-token

Usage

Example with styled-components:

import styled from 'styled-components';
import {
  Animations,
  Borders,
  Colors,
  Spacings,
  Typography
} from 'sds-design-token';

export const Button = styled.button`
  background: ${Colors.colorPrimary};
  border: 0;
  border-radius: ${Borders.borderRadius};
  color: ${Colors.colorWhitePrimary};
  cursor: pointer;
  font-family: ${Typography.fontFamilyPrimary};
  font-size: ${Typography.fontSizeBase};
  padding: ${Spacings.spacingBase};
  transition: all ${Animations.durationSm} ${Animations.timingBase};

  &:hover {
    background: ${Colors.colorPrimaryLight};
  }
`;

Take a look at this working example at codesandbox.io

Properties

Colors

AttributesValues
colorWarningrgb(228, 126, 26)
colorBackgroundLightrgb(245, 245, 245)
colorWhiteSecondaryrgba(255, 255, 255, 0.6)
colorBlackrgb(0, 0, 0)
colorPrimaryrgb(0, 91, 149)
colorBlackPrimaryrgba(0, 0, 0, 0.87)
colorSuccessrgb(90, 153, 48)
colorBackgroundMediumrgb(238, 238, 238)
colorBackgroundDarkrgb(221, 221, 221)
colorErrorrgb(176, 0, 32)
colorPrimaryMediumrgb(8, 140, 202)
colorSecondaryLightrgb(241, 241, 241)
colorWhitePrimaryrgb(255, 255, 255)
colorSecondaryrgb(71, 71, 71)
colorBlackSecondaryrgba(0, 0, 0, 0.6)
colorSecondaryMediumrgb(102, 102, 102)
colorPrimaryLightrgb(132, 214, 245)
colorSuportrgb(8, 140, 202)

Typographies

AttributesValues
fontFamilyPrimaryOpen Sans, sans-serif
fontFamilySecondaryMontserrat, sans-serif
fontSizeBase1rem
fontSizeSm0.875rem
fontSizeXs0.75rem
lineHeightBase1.5rem
lineHeightSm1.25rem
lineHeightXs1rem

Spacings

AttributesValues
spacingBase1rem
spacingXl2rem
spacingXxl2.5rem
spacingMd0.75rem
spacingNone0rem
spacingSm0.5rem
spacingXs.25rem
spacingLg1.5rem
spacingXxs.125rem

Borders

AttributesValues
borderSizeMd2px
colorBorderWhiteMediumrgba(255, 255, 255, 0.38)
borderRadius4px
borderSizeSm1px
borderSizeLg3px
colorBorderWhiteLightrgba(255, 255, 255, 0.2)
colorBorderMediumrgba(0, 0, 0, 0.24)
colorBorderDarkrgba(0, 0, 0, 0.6)
colorBorderLightrgba(0, 0, 0, 0.12)

Opacities

AttributesValues
opacityBackgroundLightHover0.04
opacityBackgroundLightSelected0.08
opacityBackgroundLightActive0.24
opacityBackgroundDarkHover0.12
opacityBackgroundDarkSelected0.16
opacityBackgroundDarkActive0.24
opacityDisabled0.4

Widths

AttributesValues
containerMaxWidth74.75rem
containerMWidth49rem
containerSWidth35rem
containerXsWidth17.5rem
containerMobileWidth20rem

MediaQueries ( breakpoints)

AttributesValues
mediaQuerySmall36rem
mediaQueryMedium48rem
mediaQueryLarge62rem

Animations

AttributesValues
durationXs100ms
durationSm200ms
durationBase250ms
timingBaseease-out
0.9.1

5 years ago

0.9.0

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago