Base styles and individual HTML component styles for the Helsinki Design System.
📚 See the components in Storybook
yarn add hds-core
hds-core/
├── src/ # source css
└── lib/
├── components/ # collection of HDS component styles
│ ├── all.css # bundled stylesheet including all components
| └── <component name>/ # component stylesheets
│ ├── <component name>.css
│ :
│
├── icons/ # collection of HDS icon styles
│ ├── all.css # bundled stylesheet including all icons
│ ├── icon.css # base styles for icons
│ ├── icon-<icon name>.css # individual icon stylesheet
│ :
│
├── utils/ # utility stylesheets
├── variables/ # collection of css variables and base styles
└── base.css # base styles
To import styles for all the core components, you'll need two stylesheets: base.css
(the base styles and CSS variables) and components/all.css
. If you use any of the icons, you'll also need icons/all.css
. Do note that the all.css
-files bundle all the components and icons into single stylesheets and thus are large in filesize.
Therefore, we do recommend that you use individual component and icon stylesheets instead of the bundled styles.
JS
// import base styles and css variables
import "hds-core";
The Helsinki fonts are not included in the package due to copyright reasons.
Helsinki Design System uses CSS variables from the hds-design-tokens package to control coloring, spacing and layout. You can override these variables if necessary, but it is not recommended.
Read more here.
- PostCSS
- Storybook
- hds-core follows the BEM methodology