highsoft-design-tokens
v2.7.0
Published
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
Readme
👨🏼🎨 Highsoft Design Tokens
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.
Figma resources
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)
Installation
To install this package, run the following command:
npm install highsoft-design-tokens --saveUsing a CSS preprocessor like Sass, or a module bundler like Webpack, you can import the CSS file directly into your CSS/Sass files:
@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.
"css-compile": "sass --load-path=node_modules //the rest of your code goes here"Using CSS Variables
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:
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);
}Using Animations
The package provides three animation types:
When to Use Each Type
- Bounce: For playful effects, slides, and drawers
- Fade: For smooth transitions and overlays
- Classic: For standard UI transitions
Usage Examples
/* 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);
}Using Links
The package provides a link mixin that can be used to style links with either a native or fancy appearance.
Usage
@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);
}Using Breakpoint Mixins
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:
@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%;
}
}Bugs and feature requests
Please use [GitHub issues] to report bugs or request features. If you have any questions about the tokens, please contact @kennethknudsen
All tokens
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:#FFFFFFprimitives-neutral-25:#F7F7F8primitives-neutral-50:#F2F1F4primitives-neutral-100:#E3E3E8primitives-neutral-200:#C8C7D1primitives-neutral-300:#ACABBAprimitives-neutral-400:#918FA3primitives-neutral-500:#75738Cprimitives-neutral-600:#5E5C70primitives-neutral-700:#474554primitives-neutral-750:#3B3A46primitives-neutral-800:#2F2E38primitives-neutral-900:#18171Cprimitives-neutral-950:#0A090Dprimitives-neutral-1000:#000000primitives-brand-50:#F6F8FFprimitives-brand-100:#F0F1FFprimitives-brand-200:#E1E3FFprimitives-brand-300:#C3C8FFprimitives-brand-400:#A5ACFFprimitives-brand-500:#8791FFprimitives-brand-600:#626BD0primitives-brand-700:#4A55C9primitives-brand-800:#3F4699primitives-brand-900:#2A2F66primitives-brand-1000:#151733primitives-success-50:#ECFDF5primitives-success-100:#D1FAE5primitives-success-200:#A7F3D0primitives-success-300:#6EE7B7primitives-success-400:#34D399primitives-success-500:#10B981primitives-success-600:#059669primitives-success-700:#047857primitives-success-800:#065F46primitives-success-900:#064E3Bprimitives-success-1000:#033427primitives-attention-50:#FFFBEBprimitives-attention-100:#FEF3C7primitives-attention-200:#FDE68Aprimitives-attention-300:#FCD34Dprimitives-attention-400:#FBBF24primitives-attention-500:#F59E0Bprimitives-attention-600:#D97706primitives-attention-700:#B45309primitives-attention-800:#92400Eprimitives-attention-900:#78350Fprimitives-attention-1000:#592507primitives-danger-50:#FEF2F2primitives-danger-100:#FEE2E2primitives-danger-200:#FECACAprimitives-danger-300:#FCA5A5primitives-danger-400:#F87171primitives-danger-500:#EF4444primitives-danger-600:#DC2626primitives-danger-700:#B91C1Cprimitives-danger-800:#991B1Bprimitives-danger-900:#7F1D1Dprimitives-danger-1000:#570D0D
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:#8087E8brand_dark-chart-color2:#A3EDBAbrand_dark-chart-color3:#F19E53brand_dark-chart-color4:#6699A1brand_dark-chart-color5:#E1D369brand_dark-chart-color6:#87B4E7brand_dark-chart-color7:#DA6D85brand_dark-chart-color8:#BBBAC5brand_dark-background-color:#1f1836brand_dark-text-color:#ffffff
Brand_light
brand_light-chart-color1:#8087E8brand_light-chart-color2:#A3EDBAbrand_light-chart-color3:#F19E53brand_light-chart-color4:#6699A1brand_light-chart-color5:#E1D369brand_light-chart-color6:#87B4E7brand_light-chart-color7:#DA6D85brand_light-chart-color8:#BBBAC5brand_light-background-color:#f0f0f0brand_light-text-color:#2F2B38
Dark_unica
dark_unica-chart-color1:#2b908fdark_unica-chart-color2:#90ee7edark_unica-chart-color3:#f45b5bdark_unica-chart-color4:#7798BFdark_unica-chart-color5:#aaeeeedark_unica-chart-color6:#ff0066dark_unica-chart-color7:#eeaaeedark_unica-chart-color8:#55BF3Bdark_unica-chart-color9:#DF5353dark_unica-chart-color10:#7798BFdark_unica-chart-color11:#aaeeeedark_unica-background-color:#2a2a2bdark_unica-text-color:#E0E0E3
Default
default-chart-color1:#2caffedefault-chart-color2:#544fc5default-chart-color3:#00e272default-chart-color4:#fe6a35default-chart-color5:#6b8abcdefault-chart-color6:#d568fbdefault-chart-color7:#2ee0cadefault-chart-color8:#fa4b42default-chart-color9:#f9c80edefault-chart-color10:#f9c80edefault-background-color:#ffffffdefault-text-color:#000000
Grid_light
grid_light-chart-color1:#7cb5ecgrid_light-chart-color2:#f7a35cgrid_light-chart-color3:#90ee7egrid_light-chart-color4:#7798BFgrid_light-chart-color5:#aaeeeegrid_light-chart-color6:#ff0066grid_light-chart-color7:#eeaaeegrid_light-chart-color8:#55BF3Bgrid_light-chart-color9:#DF5353grid_light-chart-color10:#7798BFgrid_light-chart-color11:#aaeeeegrid_light-background-color:transparentgrid_light-text-color:#000000
Sand_signika
sand_signika-chart-color1:#f45b5bsand_signika-chart-color2:#8085e9sand_signika-chart-color3:#8d4654sand_signika-chart-color4:#7798BFsand_signika-chart-color5:#aaeeeesand_signika-chart-color6:#ff0066sand_signika-chart-color7:#eeaaeesand_signika-chart-color8:#55BF3Bsand_signika-chart-color9:#DF5353sand_signika-chart-color10:#7798BFsand_signika-chart-color11:#aaeeeesand_signika-background-color:transparentsand_signika-text-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
