Socket
Book a DemoInstallSign in
Socket

@ukic/canary-react

Package Overview
Dependencies
Maintainers
3
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ukic/canary-react

React-wrapped web components compiled using StencilJS

3.0.0-canary.24
latest
Source
npmnpm
Version published
Weekly downloads
5.1K
35.3%
Maintainers
3
Weekly downloads
 
Created
Source

[Canary]: The UK Intelligence Community React UI Kit

OGL V3 License MIT License npm

The Intelligence Community Design System helps the United Kingdom's Intelligence Community (MI6, GCHQ, MI5, and partners) to quickly build powerful capabilities that are accessible and easy to use.

This is a joint project led by MI6, working with GCHQ, MI5 and HMGCC (our national security partner).

Installing

To install the components:

Step one

In the root of your project:

# using npm
npm install @ukic/canary-react @ukic/fonts

# using yarn
rm package-lock.json
yarn add @ukic/canary-react @ukic/fonts

Step two

To get the correct styling with the ICDS components, import the core CSS file.

Add the following into the top level CSS file for your project.

@import "@ukic/fonts/dist/fonts.css";
@import "@ukic/canary-react/dist/core/core.css";

In order to be rendered consistently across browsers and in line with modern standards, each of the ICDS components uses styles from a global CSS file based on Normalize.css.

If you would like to import these styles in order to apply them to the rest of your project and slotted elements used within any of the ICDS components, add the following into the top level CSS file as well.

@import "@ukic/canary-react/dist/core/normalize.css";

Step three

Import the component(s) in your React files.

import { IcComponent } from "@ukic/canary-react";

Step four

The @ukic/canary-react package will need to be transformed before you can use these components in Jest tests.

Add a transformIgnorePatterns field with the value ["/node_modules/(?!@ukic/canary-react)"] to your Jest config.

Typescript

If your project is making use of Typescript, you can import the custom types used in the ICDS component library. For details on the types implemented in each component, refer to the Props table on the Code page for each Component on the Design System Guidance site

Types can be imported from the @ukic/canary-web-components package as per the below example.

[!NOTE]
You do not have to install this package into your project, it is already installed as a dependency of @ukic/canary-react.

import { IcPaginationBarOptions } from '@ukic/canary-web-components';

let paginationConfig: IcPaginationBarOptions = {
  itemsPerPageOptions: [
    { label: "5", value: "5" },
    { label: "10", value: "10" },
  ],
  showItemsPerPageControl: true,
  selectedItemsPerPage: 5,
}

Security

If you've found a vulnerability, we want to know so that we can fix it. Our security policy tells you how to do this.

License

Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation. The documentation is and available under the terms of the Open Government License v3.0.

© Crown copyright 2022

FAQs

Package last updated on 20 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.