npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kainossoftwareltd-govuk-react-kainos

v1.2.1

Published

A react port of the gds frontend toolkit

Readme

govuk-react-kainos

Installation

To use the package in your project run npm install kainossoftwareltd-govuk-react-kainos

The repository

Description

Component library with govuk styled components, documented with storybook. The application is built using React v17.0.2. and contains most, but not all (yet) components The application uses webpack for bundling assets and dependencies. We utilize TypeScript aliases defined in tsconfig.json, webpack, and Jest configurations, to help streamline module imports and enhancing code readability.

Style and Types of various components are referenced in the gov.uk design system documentation: https://design-system.service.gov.uk/components/button/

Including the stylesheets

In your main stylesheet include this at the top of the file:

@import 'kainossoftwareltd-govuk-react-kainos/dist/index.css';

This import includes all of the GDS frontend toolkit stylesheets along with all the stylesheets for non GDS compontents and features.

Adding a component - example

Import the required component and any supporting types from the library. Refer to storybook documentation for a full list of properties for each component. .govuk-frontend-supported should be added to the body of your app in order for styling to be applied to some components

import { Button, Variant } from 'kainossoftwareltd-govuk-react-kainos';

const ExampleComponent = () => {
    const handleClick = () => {
        console.log('Click handled')
    }

    return (
        <Button
            variant={Variant.SECONDARY}
            onClick={handleClick}
            className="govuk-!-margin-left-5"
            data-testid="load-more-button"
        >
            Click me
        </Button>
    )
}

Using link components with a router

Several components accept a linkComponent prop that lets you use your router's Link instead of a plain <a>. This makes the library router-agnostic — it works with React Router, Next.js, Gatsby, or any other framework.

Components that support linkComponent: Button, BackLink, Breadcrumbs, Footer, Pagination, SummaryList, TaskList, ServiceNavigation.

Because the library standardises on the HTML href attribute internally, you need a thin adapter that maps href to the prop your router expects. Define it once in your app and reuse it everywhere. Make sure any href values (including those returned from pagination or path functions) are fully-formed URLs, typically starting with /, rather than relative segments like page-2 which would resolve under the current path:

// React Router v6
import { Link } from 'react-router-dom';
const RouterLink = ({ href, ...props }) => <Link to={href} {...props} />;

// Next.js
import NextLink from 'next/link';
const RouterLink = ({ href, ...props }) => <NextLink href={href} {...props} />;

Then pass it to any component that renders links:

import { Button, BackLink, Breadcrumbs } from 'kainossoftwareltd-govuk-react-kainos';

<Button href="/dashboard" linkComponent={RouterLink}>Go to dashboard</Button>
<BackLink href="/previous-page" linkComponent={RouterLink} />
<Breadcrumbs items={[{ children: 'Home', href: '/' }]} linkComponent={RouterLink} />

If no linkComponent is provided, a standard <a> element is used.