This package ensures a seamless integration of design principles into your codebase, making your development process more efficient and your end product more cohesive and visually appealing
npm install highsoft-design-tokens!cover This package provides a comprehensive set of CSS custom properties (variables) derived from our design system, ensuring a seamless integration of design principles into your codebase. This approach makes your development process more efficient and your end product more cohesive and visually appealing.
You can find the design tokens in the following Figma files (you need to be logged in with SSO to access them)
🎨 Color system (Figma)
🔠 Typography (Figma)
🪄 Effects (Figma)
To install this package, run the following command:
``bash`
npm install highsoft-design-tokens --save
Using a CSS preprocessor like Sass, or a module bundler like Webpack, you can import the CSS file directly into your CSS/Sass files:
`css`
@import "highsoft-design-tokens/dist/css/tokens";
You need to add the --load-path=node_modules option to your Sass command. This directs Sass to look inside the node_modules directory for any @import statements.
`json`
"css-compile": "sass --load-path=node_modules //the rest of your code goes here"
The package contains a set of predefined CSS custom properties encapsulated within the :root selector. This makes them globally available across your entire application. You can use them in your CSS/Sass files like this:
`css
body {
background-color: var(--primitives-brand-600);
color: var(--primitives-neutral-900);
}
button {
background-color: var(--primitives-success-500);
border-radius: var(--border_radius-size-4);
}
`
The package provides three animation types:
- Bounce: For playful effects, slides, and drawers
- Fade: For smooth transitions and overlays
- Classic: For standard UI transitions
`css
/ Button hover with bounce animation /
button:hover {
transform: translateY(-2px);
animation: var(--animations-bounce-fast);
}
/ Modal fade in/out /
.modal {
opacity: 0;
animation: var(--animations-fade-default);
}
/ Menu slide animation /
.menu {
transform: translateX(-100%);
animation: var(--animations-classic-default);
}
`
The package provides a link mixin that can be used to style links with either a native or fancy appearance.
`scss
@use "highsoft-design-tokens/dist/scss/mixins/links" as *;
// Native link style (default)
a {
@include link();
}
// Fancy link style with gradient underline
a.fancy {
@include link(fancy);
}
`
Use the breakpoint mixin to apply responsive styles with sizes phone, tablet, laptop, desktop, and desktop-plus. Each breakpoint uses a max-width media query to apply styles for that screen size and below:
`scss
@use "highsoft-design-tokens/dist/scss/mixins/breakpoints" as *;
.element {
@include for-size(phone) {
width: 100%;
}
@include for-size(tablet) {
width: 50%;
}
@include for-size(laptop) {
width: 33%;
}
}
`
Please use [GitHub issues] to report bugs or request features. If you have any questions about the tokens, please contact @kennethknudsen
#### Animations
- animations-bounce-instant: 0.1s cubic-bezier(0.6, 1, 0.2, 1.2)animations-bounce-fast
- : 0.2s cubic-bezier(0.6, 1, 0.2, 1.2)animations-bounce-default
- : 0.3s cubic-bezier(0.6, 1, 0.2, 1.2)animations-bounce-slow
- : 0.4s cubic-bezier(0.6, 1, 0.2, 1.2)animations-bounce-long
- : 0.5s cubic-bezier(0.6, 1, 0.2, 1.2)animations-fade-instant
- : 0.1s cubic-bezier(0.85, 0, 0.15, 1)animations-fade-fast
- : 0.2s cubic-bezier(0.85, 0, 0.15, 1)animations-fade-default
- : 0.3s cubic-bezier(0.85, 0, 0.15, 1)animations-fade-slow
- : 0.4s cubic-bezier(0.85, 0, 0.15, 1)animations-fade-long
- : 0.5s cubic-bezier(0.85, 0, 0.15, 1)animations-classic-instant
- : 0.1s cubic-bezier(0.65, 0, 0.35, 1)animations-classic-fast
- : 0.2s cubic-bezier(0.65, 0, 0.35, 1)animations-classic-default
- : 0.3s cubic-bezier(0.65, 0, 0.35, 1)animations-classic-slow
- : 0.4s cubic-bezier(0.65, 0, 0.35, 1)animations-classic-long
- : 0.5s cubic-bezier(0.65, 0, 0.35, 1)
#### Primitives
- primitives-neutral-0: !color #FFFFFFprimitives-neutral-25
- : !color #F7F7F8primitives-neutral-50
- : !color #F2F1F4primitives-neutral-100
- : !color #E3E3E8primitives-neutral-200
- : !color #C8C7D1primitives-neutral-300
- : !color #ACABBAprimitives-neutral-400
- : !color #918FA3primitives-neutral-500
- : !color #75738Cprimitives-neutral-600
- : !color #5E5C70primitives-neutral-700
- : !color #474554primitives-neutral-750
- : !color #3B3A46primitives-neutral-800
- : !color #2F2E38primitives-neutral-850
- : !color #23222Aprimitives-neutral-900
- : !color #18171Cprimitives-neutral-950
- : !color #0A090Dprimitives-neutral-1000
- : !color #000000primitives-brand-50
- : !color #F6F8FFprimitives-brand-100
- : !color #F0F1FFprimitives-brand-200
- : !color #E1E3FFprimitives-brand-300
- : !color #C3C8FFprimitives-brand-400
- : !color #A5ACFFprimitives-brand-500
- : !color #8791FFprimitives-brand-600
- : !color #626BD0primitives-brand-700
- : !color #4A55C9primitives-brand-800
- : !color #3F4699primitives-brand-900
- : !color #2A2F66primitives-brand-1000
- : !color #151733primitives-success-50
- : !color #ECFDF5primitives-success-100
- : !color #D1FAE5primitives-success-200
- : !color #A7F3D0primitives-success-300
- : !color #6EE7B7primitives-success-400
- : !color #34D399primitives-success-500
- : !color #10B981primitives-success-600
- : !color #059669primitives-success-700
- : !color #047857primitives-success-800
- : !color #065F46primitives-success-900
- : !color #064E3Bprimitives-success-1000
- : !color #033427primitives-attention-50
- : !color #FFFBEBprimitives-attention-100
- : !color #FEF3C7primitives-attention-200
- : !color #FDE68Aprimitives-attention-300
- : !color #FCD34Dprimitives-attention-400
- : !color #FBBF24primitives-attention-500
- : !color #F59E0Bprimitives-attention-600
- : !color #D97706primitives-attention-700
- : !color #B45309primitives-attention-800
- : !color #92400Eprimitives-attention-900
- : !color #78350Fprimitives-attention-1000
- : !color #592507primitives-danger-50
- : !color #FEF2F2primitives-danger-100
- : !color #FEE2E2primitives-danger-200
- : !color #FECACAprimitives-danger-300
- : !color #FCA5A5primitives-danger-400
- : !color #F87171primitives-danger-500
- : !color #EF4444primitives-danger-600
- : !color #DC2626primitives-danger-700
- : !color #B91C1Cprimitives-danger-800
- : !color #991B1Bprimitives-danger-900
- : !color #7F1D1Dprimitives-danger-1000
- : !color #570D0Dprimitives-danger-1100
- : !color #450A0Aprimitives-danger-1200
- : !color #330606
#### Shadow
- shadow-size-50: 0px 0px 1px 0px rgba(0, 0, 0, 0.1), 0px 1px 1px 0px rgba(0, 0, 0, 0.09), 0px 3px 2px 0px rgba(0, 0, 0, 0.05), 0px 6px 2px 0px rgba(0, 0, 0, 0.01)shadow-size-100
- : 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 3px 3px 0px rgba(0, 0, 0, 0.05), 0px 7px 4px 0px rgba(0, 0, 0, 0.03), 0px 13px 5px 0px rgba(0, 0, 0, 0.01)shadow-size-200
- : 0px 1px 2px 0px rgba(0, 0, 0, 0.08), 0px 4px 4px 0px rgba(0, 0, 0, 0.07), 0px 10px 6px 0px rgba(0, 0, 0, 0.04), 0px 18px 7px 0px rgba(0, 0, 0, 0.01)shadow-size-300
- : 0px 2px 4px 0px rgba(0, 0, 0, 0.08), 0px 7px 7px 0px rgba(0, 0, 0, 0.07), 0px 17px 10px 0px rgba(0, 0, 0, 0.04), 0px 30px 12px 0px rgba(0, 0, 0, 0.01)
#### Border_radius
- border_radius-size-0: 0pxborder_radius-size-1
- : 1pxborder_radius-size-2
- : 2pxborder_radius-size-4
- : 4pxborder_radius-size-8
- : 8pxborder_radius-size-16
- : 16pxborder_radius-size-32
- : 32pxborder_radius-size-64
- : 64pxborder_radius-size-128
- : 128pxborder_radius-size-full
- : 100%
#### Breakpoint
- breakpoint-size-mobile: 375pxbreakpoint-size-tablet
- : 850pxbreakpoint-size-laptop
- : 1000pxbreakpoint-size-desktop
- : 1160pxbreakpoint-size-desktop-plus
- : 1300px
#### Containers
- containers-max-width: 1300pxcontainers-outer-padding
- : 20pxcontainers-inner-padding-0
- : 0pxcontainers-inner-padding-50
- : 2pxcontainers-inner-padding-100
- : 4pxcontainers-inner-padding-200
- : 8pxcontainers-inner-padding-300
- : 12pxcontainers-inner-padding-400
- : 16pxcontainers-inner-padding-500
- : 20pxcontainers-inner-padding-600
- : 24pxcontainers-inner-padding-700
- : 32pxcontainers-inner-padding-800
- : 40pxcontainers-inner-padding-900
- : 48pxcontainers-inner-padding-1000
- : 64pxcontainers-inner-padding-1100
- : 80pxcontainers-inner-padding-1200
- : 96pxcontainers-inner-padding-1300
- : 112pxcontainers-inner-padding-1400
- : 120pxcontainers-inner-padding-1500
- : 128px
#### Item
- item-spacing-0: 0pxitem-spacing-50
- : 1pxitem-spacing-100
- : 2pxitem-spacing-200
- : 4pxitem-spacing-300
- : 6pxitem-spacing-400
- : 8pxitem-spacing-500
- : 10pxitem-spacing-600
- : 12pxitem-spacing-700
- : 16pxitem-spacing-800
- : 20pxitem-spacing-900
- : 24pxitem-spacing-1000
- : 32px
#### Margin
- margin-size-0: 0pxmargin-size-1
- : 1pxmargin-size-2
- : 2pxmargin-size-4
- : 4pxmargin-size-8
- : 8pxmargin-size-16
- : 16pxmargin-size-32
- : 32pxmargin-size-64
- : 64pxmargin-size-128
- : 128pxmargin-size-256
- : 256pxmargin-size-512
- : 512px
#### Padding
- padding-size-0: 0pxpadding-size-1
- : 1pxpadding-size-2
- : 2pxpadding-size-4
- : 4pxpadding-size-8
- : 8pxpadding-size-16
- : 16pxpadding-size-32
- : 32pxpadding-size-64
- : 64pxpadding-size-128
- : 128pxpadding-size-256
- : 256pxpadding-size-512
- : 512px
#### Brand_dark
- brand_dark-chart-color1: !color #8087E8brand_dark-chart-color2
- : !color #A3EDBAbrand_dark-chart-color3
- : !color #F19E53brand_dark-chart-color4
- : !color #6699A1brand_dark-chart-color5
- : !color #E1D369brand_dark-chart-color6
- : !color #87B4E7brand_dark-chart-color7
- : !color #DA6D85brand_dark-chart-color8
- : !color #BBBAC5brand_dark-background-color
- : !color #1f1836brand_dark-text-color
- : !color #ffffff
#### Brand_light
- brand_light-chart-color1: !color #8087E8brand_light-chart-color2
- : !color #A3EDBAbrand_light-chart-color3
- : !color #F19E53brand_light-chart-color4
- : !color #6699A1brand_light-chart-color5
- : !color #E1D369brand_light-chart-color6
- : !color #87B4E7brand_light-chart-color7
- : !color #DA6D85brand_light-chart-color8
- : !color #BBBAC5brand_light-background-color
- : !color #f0f0f0brand_light-text-color
- : !color #2F2B38
#### Dark_unica
- dark_unica-chart-color1: !color #2b908fdark_unica-chart-color2
- : !color #90ee7edark_unica-chart-color3
- : !color #f45b5bdark_unica-chart-color4
- : !color #7798BFdark_unica-chart-color5
- : !color #aaeeeedark_unica-chart-color6
- : !color #ff0066dark_unica-chart-color7
- : !color #eeaaeedark_unica-chart-color8
- : !color #55BF3Bdark_unica-chart-color9
- : !color #DF5353dark_unica-chart-color10
- : !color #7798BFdark_unica-chart-color11
- : !color #aaeeeedark_unica-background-color
- : !color #2a2a2bdark_unica-text-color
- : !color #E0E0E3
#### Default
- default-chart-color1: !color #2caffedefault-chart-color2
- : !color #544fc5default-chart-color3
- : !color #00e272default-chart-color4
- : !color #fe6a35default-chart-color5
- : !color #6b8abcdefault-chart-color6
- : !color #d568fbdefault-chart-color7
- : !color #2ee0cadefault-chart-color8
- : !color #fa4b42default-chart-color9
- : !color #f9c80edefault-chart-color10
- : !color #f9c80edefault-background-color
- : !color #ffffffdefault-text-color
- : !color #000000
#### Grid_light
- grid_light-chart-color1: !color #7cb5ecgrid_light-chart-color2
- : !color #f7a35cgrid_light-chart-color3
- : !color #90ee7egrid_light-chart-color4
- : !color #7798BFgrid_light-chart-color5
- : !color #aaeeeegrid_light-chart-color6
- : !color #ff0066grid_light-chart-color7
- : !color #eeaaeegrid_light-chart-color8
- : !color #55BF3Bgrid_light-chart-color9
- : !color #DF5353grid_light-chart-color10
- : !color #7798BFgrid_light-chart-color11
- : !color #aaeeeegrid_light-background-color
- : transparentgrid_light-text-color
- : !color #000000
#### Sand_signika
- sand_signika-chart-color1: !color #f45b5bsand_signika-chart-color2
- : !color #8085e9sand_signika-chart-color3
- : !color #8d4654sand_signika-chart-color4
- : !color #7798BFsand_signika-chart-color5
- : !color #aaeeeesand_signika-chart-color6
- : !color #ff0066sand_signika-chart-color7
- : !color #eeaaeesand_signika-chart-color8
- : !color #55BF3Bsand_signika-chart-color9
- : !color #DF5353sand_signika-chart-color10
- : !color #7798BFsand_signika-chart-color11
- : !color #aaeeeesand_signika-background-color
- : transparentsand_signika-text-color
- : !color #000000
#### Headings
- headings-size-h1: 3.5remheadings-size-h2
- : 2.625remheadings-size-h3
- : 2remheadings-size-h4
- : 1.5remheadings-size-h5
- : 1.125remheadings-size-h6
- : 1remheadings-lineHeight-text
- : 130%headings-weight-bold
- : 700
#### Typography
- typography-size-50: 0.6875remtypography-size-75
- : 0.75remtypography-size-100
- : 0.875remtypography-size-200
- : 1remtypography-size-300
- : 1.125remtypography-size-400
- : 1.25remtypography-size-500
- : 1.375remtypography-size-600
- : 1.5625remtypography-size-700
- : 1.75remtypography-size-800
- : 2remtypography-size-900
- : 2.25remtypography-size-1000
- : 2.5remtypography-lineHeight-ui
- : 100%typography-lineHeight-text
- : 130%typography-weight-normal
- : 400typography-weight-medium
- : 500typography-weight-semi
- : 600`