Skip to content
Back to search

designsystem

Kirby Design System

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/kirbydesign/designsystem with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/kirbydesign/designsystem'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/kirbydesign--designsystem/badge.svg)](/listings/kirbydesign--designsystem)

HTML

<a href="/listings/kirbydesign--designsystem"><img src="/api/listings/kirbydesign--designsystem/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install through npm:

npm i @kirbydesign/designsystem

Provide Kirby

Environment providers for Kirby are set up with the `provideKirby()` function.

In addition, any host application must use `withGlobalSetup()` when providing Kirby during bootstrapping of the application to register Kirby components correctly in the browser.

Example Usage

providers: [provideKirby(withGlobalSetup())];

If multiple Angular contexts exist within the same application, e.g. in a Micro Frontend architecture, the host should set up the global config, and the Micro Frontends should simply call `provideKirby()`.

An additional `KirbyConfig` can be provided to set up shared behavior across the application.

Example Host Application Config

provideKirby(
  withGlobalSetup({
    focusManager: true,
    setHtmlDocTitle: true,
  })
);

Focus Management

The `focusManager` option enables focus management for components rendered in a `kirby-router-outlet`. For instance, when a `kirby-page` enters the view, focus will automatically be set to the primary heading (`h1`) inside the page toolbar. This improves accessibility and keyboard navigation.

Setting the HTML Document Title

The `setHtmlDocTitle` function updates the `<title>` element of the HTML document to match any Kirby Page title on navigation. This is useful for dynamically reflecting the current page or application state in the browser tab, improving usability and accessibility.

Sass

Include the Kirby global styles in your app, e.g., in `src/styles.scss`:

@use '@kirbydesign/designsystem/scss/global-styles';

In each `.scss` file where you need to access the Sass utility functions from Kirby (e.g. [colors][kirby.cookbook.colors] or [fonts][kirby.cookbook.fonts]) you must import the scss utilities:

@use '@kirbydesign/designsystem/scss/utils';

Generic Print Styles (Optional)

Kirby also provides a generic print stylesheet. It includes the basics. You most likely have to add local print styles specific to your app as well.

Import it into your app, e.g., in `src/styles.scss` or in your local print stylesheet if you have one:

@use '@kirbydesign/designsystem/scss/print';

Testing

To unit-test applications using Kirby's Components, we recommend importing one of the following modules:

- When using [jasmine][jasmine]: `import { KirbyTestingModule } from '@kirbydesign/designsystem/`**`testing-jasmine'`**`;` - When using [jest][jest]: `import { KirbyTestingModule } from '@kirbydesign/designsystem/`**`testing-jest'`**`;`

Example:

import { KirbyTestingModule } from '@kirbydesign/designsystem/testing-jasmine';

describe('AppComponent', () => {
  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [KirbyTestingModule],
      declarations: [AppComponent]
    }).compileComponents();
  }));

  ...

});

For unit test performance reasons it's highly recommended to utilize these modules, since they provide a template-less implementation of the Kirby Components, but still translude content through `<ng-content></ng-content>` and provide `@Input` -decorated properties and `@Output` -decorated `EventEmitter` s, without having to reflow the DOM, execute component logic etc.

Standalone components

Standalone components compile their templates against their own `imports`, so importing `KirbyTestingModule` in the test is not enough: the real Kirby components would still be rendered. Replace the Kirby imports of the standalone component under test with mocks using `overrideKirbyImports`:

import {
  KirbyTestingModule,
  overrideKirbyImports,
} from '@kirbydesign/designsystem/testing-jasmine';

import { AccountOverviewComponent } from './account-overview.component';

describe('AccountOverviewComponent', () => {
  beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [KirbyTestingModule, AccountOverviewComponent],
    });

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

readme.md · README · 262 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ## Kirby Design System
  2. <!-- Badges section here. -->
  3. <!-- [![npm](https://img.shields.io/npm/v/@kirbydesign/designsystem/next.svg)][npm-badge-url] -->
  4. [![npm](https://img.shields.io/npm/v/@kirbydesign/designsystem.svg)](https://www.npmjs.com/package/@kirbydesign/designsystem)
  5. [![npm](https://img.shields.io/npm/l/@kirbydesign/designsystem.svg)](https://www.npmjs.com/package/@kirbydesign/designsystem)
  6. [![npm](https://img.shields.io/npm/dm/@kirbydesign/designsystem.svg)](https://www.npmjs.com/package/@kirbydesign/designsystem)
  7. [![GitHub forks](https://img.shields.io/github/forks/kirbydesign/designsystem.svg?style=social&label=Fork)](https://github.com/kirbydesign/designsystem/fork)
  8. [![GitHub stars](https://img.shields.io/github/stars/kirbydesign/designsystem.svg?style=social&label=Star)](https://github.com/kirbydesign/designsystem/stargazers)
  9. ## About
  10. Kirby Design System is a UX Component library implementing the [Kirby Design Philosophy][kirby.design].
  11. Kirby Components are built on top of [Angular][angular] and can be used in Angular projects.
  12. The Kirby Cookbook, containing samples, status of components etc. can be accessed from [https://cookbook.kirby.design][kirby.cookbook].
  13. ## Table of Contents
  14. - [Kirby Design System](#kirby-design-system)
  15. - [About](#about)
  16. - [Table of Contents](#table-of-contents)
  17. - [Installation](#installation)
  18. - [Include KirbyModule](#include-kirbymodule)
  19. - [Sass](#sass)
  20. - [Generic Print Styles (Optional)](#generic-print-styles-optional)
  21. - [Testing](#testing)
  22. - [Icons](#icons)
  23. - [Migration Guides](#migration-guides)
  24. - [Folder Structure](#folder-structure)
  25. - [Scripts](#scripts)
  26. - [Contributing](#contributing)
  27. ## Installation
  28. Install through npm:
  29. ```bash
  30. npm i @kirbydesign/designsystem
  31. ```
  32. ### Provide Kirby
  33. Environment providers for Kirby are set up with the `provideKirby()` function.
  34. In addition, any host application must use `withGlobalSetup()` when providing Kirby during bootstrapping of the application to register Kirby components correctly in the browser.
  35. #### Example Usage
  36. ```ts
  37. providers: [provideKirby(withGlobalSetup())];
  38. ```
  39. If multiple Angular contexts exist within the same application, e.g. in a Micro Frontend architecture, the host should set up the global config, and the Micro Frontends should simply call `provideKirby()`.
  40. An additional `KirbyConfig` can be provided to set up shared behavior across the application.
  41. #### Example Host Application Config
  42. ```ts
  43. provideKirby(
  44. withGlobalSetup({
  45. focusManager: true,
  46. setHtmlDocTitle: true,
  47. })
  48. );
  49. ```
  50. #### Focus Management
  51. The `focusManager` option enables focus management for components rendered in a `kirby-router-outlet`. For instance, when a `kirby-page` enters the view, focus will automatically be set to the primary heading (`h1`) inside the page toolbar. This improves accessibility and keyboard navigation.
  52. #### Setting the HTML Document Title
  53. The `setHtmlDocTitle` function updates the `<title>` element of the HTML document to match any Kirby Page title on navigation.
  54. This is useful for dynamically reflecting the current page or application state in the browser tab, improving usability and accessibility.
  55. ### Sass
  56. Include the Kirby global styles in your app, e.g., in `src/styles.scss`:
  57. ```css
  58. @use '@kirbydesign/designsystem/scss/global-styles';
  59. ```
  60. In each `.scss` file where you need to access the Sass utility functions from Kirby (e.g. [colors][kirby.cookbook.colors] or [fonts][kirby.cookbook.fonts]) you must import the scss utilities:
  61. ```css
  62. @use '@kirbydesign/designsystem/scss/utils';
  63. ```
  64. #### Generic Print Styles (Optional)
  65. Kirby also provides a generic print stylesheet. It includes the basics. You most likely have to add local print styles specific to your app as well.
  66. Import it into your app, e.g., in `src/styles.scss` or in your local print stylesheet if you have one:
  67. ```css
  68. @use '@kirbydesign/designsystem/scss/print';
  69. ```
  70. ### Testing
  71. To unit-test applications using Kirby's Components, we recommend importing one of the following modules:
  72. - When using [jasmine][jasmine]: `import { KirbyTestingModule } from '@kirbydesign/designsystem/`**`testing-jasmine'`**`;`
  73. - When using [jest][jest]: `import { KirbyTestingModule } from '@kirbydesign/designsystem/`**`testing-jest'`**`;`
  74. Example:
  75. ```ts
  76. import { KirbyTestingModule } from '@kirbydesign/designsystem/testing-jasmine';
  77. describe('AppComponent', () => {
  78. beforeEach(async(() => {
  79. TestBed.configureTestingModule({
  80. imports: [KirbyTestingModule],
  81. declarations: [AppComponent]
  82. }).compileComponents();
  83. }));
  84. ...
  85. });
  86. ```
  87. For unit test performance reasons it's highly recommended to utilize these modules, since they provide a template-less implementation of the Kirby Components, but still translude content through `<ng-content></ng-content>` and provide `@Input` -decorated properties and `@Output` -decorated `EventEmitter` s, without
  88. having to reflow the DOM, execute component logic etc.
  89. #### Standalone components
  90. Standalone components compile their templates against their own `imports`, so importing `KirbyTestingModule` in the test is not enough: the real Kirby components would still be rendered. Replace the Kirby imports of the standalone component under test with mocks using `overrideKirbyImports`:
  91. ```ts
  92. import {
  93. KirbyTestingModule,
  94. overrideKirbyImports,
  95. } from '@kirbydesign/designsystem/testing-jasmine';
  96. import { AccountOverviewComponent } from './account-overview.component';
  97. describe('AccountOverviewComponent', () => {
  98. beforeEach(() => {
  99. TestBed.configureTestingModule({
  100. imports: [KirbyTestingModule, AccountOverviewComponent],
  101. });
  102. overrideKirbyImports(AccountOverviewComponent);
  103. });
  104. ...
  105. });
  106. ```
  107. `overrideKirbyImports` swaps imported Kirby components, directives and modules (including `KirbyModule`) for their mocks. `KirbyTestingModule` is still needed for mocks of Kirby services such as `ModalController` and `ToastController`. `overrideKirbyImports` must be called before `TestBed.createComponent()`, and only affects the components passed to it. Child standalone components that import Kirby must be passed as well, e.g. if `AccountOverviewComponent` renders an `<app-account-list>` and an `<app-transaction-list>`:
  108. ```ts
  109. overrideKirbyImports(AccountOverviewComponent, AccountListComponent, TransactionListComponent);
  110. ```
  111. If you need the override object itself, for instance for `TestBed.overrideComponent` or Spectator's `overrideComponents` option, use `kirbyTestingOverride`:
  112. ```ts
  113. TestBed.overrideComponent(AccountOverviewComponent, kirbyTestingOverride);
  114. ```
  115. ### Icons
  116. Kirby comes bundled with a default set of icons. Make sure the `.svg` files used by Kirby are copied to your output folder by adding the following to `build > options > assets` in `angular.json` :
  117. ```json
  118. {
  119. ...
  120. "build": {
  121. "options": {
  122. "assets": [
  123. ...,
  124. {
  125. "glob": "**/*.svg",
  126. "input": "node_modules/@kirbydesign/designsystem/icons/svg",
  127. "output": "./assets/kirby/icons/svg"
  128. },
  129. {
  130. "glob": "close.svg",
  131. "input": "node_modules/@kirbydesign/designsystem/icons/svg",
  132. "output": "./svg"
  133. },
  134. ...
  135. ],
  136. }
  137. }
  138. }
  139. ```
  140. It is possible to configure the path that the built-in icons are loaded from by providing the `BUILT_IN_ICONS_URL` injection token:
  141. ```typescript
  142. // In app providers:
  143. {
  144. provide: BUILT_IN_ICONS_URL,
  145. useValue: 'https://example.org/1.0.1/kirby/icons/svg/'
  146. }
  147. ```
  148. ### Migration Guides
  149. For details on migrating from earlier versions of Kirby see our [Migration Guides](./MIGRATION.md).
  150. ## Folder Structure
  151. The folder structure of the repository is based on [Nrwl][nrwl]'s [NX][nx] mono-repository project.
  152. A basic walkthrough is outlined in the structure below:
  153. ```
  154. @kirbydesign/designsystem
  155. ├── apps # Contains source code for applications
  156. | └── cookbook # - Cookbook application (showcase and examples)
  157. ├── dist # Contains output files when building artifacts (for distribution)
  158. | ├── apps
  159. | └── libs
  160. ├── libs # Contains source code for libraries
  161. | └── designsystem # - Actual implementation of library (designsystem)
  162. ├── scripts # Scripts for building artifacts
  163. └── tools # Contains various tools
  164. ├── generate-mocks # - CLI utility for generating mocks for `@kirbydesign/designsystem/testing-jasmine`
  165. | # and `@kirbydesign/designsystem/testing-jest` entry points.
  166. ├── sass-to-ts # - CLI and Webpack plugin for extract global variables from SASS to TS
  167. ├── schematics # - Angular schematics
  168. ```
  169. ## Scripts
  170. Below is an overview of most widely used scripts, available for this project.
  171. Use them in your terminal like: `npm run <script>` :
  172. | Command | Description |
  173. | --------- | ------------------------------------------------------------------------------------------------------------------------------ |
  174. | start | Starts the development server, providing a means of running the cookbook while developing |
  175. | publish | When run locally it produces a set of npm packages in `dist/` that can be installed locally with npm install <path to tarball> |
  176. | storybook | Opens up Storybook where component states are set up for snapshot testing with Chromatic |
  177. We use [nx][nx] to run common tasks like building, linting and testing projects.
  178. This is done with `npx nx <target name> <project name>`, e.g. `npx nx lint designsystem` preferrably _from the root of the workspace_ to ensure config paths are resolved correctly.
  179. ## Contributing
  180. If you wish to contribute new features, bug fixes or something third to the project have a look at the [contribution guidelines](./.github/CONTRIBUTING.md).
  181. [angular]: https://angular.io
  182. [jasmine]: https://jasmine.github.io/
  183. [jest]: https://jestjs.io/
  184. [nrwl]: https://nrwl.io/
  185. [nx]: https://nx.dev/getting-started/intro
  186. [kirby.design]: https://kirby.design/
  187. [kirby.cookbook]: https://cookbook.kirby.design
  188. [kirby.cookbook.fonts]: https://cookbook.kirby.design/home/showcase/fonts
  189. [kirby.cookbook.colors]: https://cookbook.kirby.design/home/showcase/colors
  190. [kirby.cookbook.list]: https://cookbook.kirby.design/home/showcase/list

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.