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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nice-digital/design-system

v5.0.24

Published

Your source for quickly creating consistent on-brand NICE digital services

Downloads

400

Readme

@nice-digital/design-system

Your source for quickly creating consistent on-brand NICE digital services.

npm GitHub release License Dependencies Dev dependencies lerna

Required software

Install Node >= 6.9.0 and npm >= 5. Choose LTS from the Node download page.

Installation

Install the NICE Design System npm package into your project by running the following on the command line:

npm i @nice-digital/design-system --save

Then follow the usage steps below:

Usage

This package is the 'kitchen sink' package which gives you access to all styles, components and icons. It references @nice-digital/nds-core, @nice-digital/icons and all the component packages.

The installed package contains:

  • source SCSS
  • pre-compiled (dist) CSS and JavaScript
  • static assets like favicon and logo.

Note: Install and reference components directly if you don't need the full kitchen sink, for example tabs.

SCSS

Import the NICE Design System into your application:

@forward '@nice-digital/design-system/scss/nice-design-system';

This gives you everything: core (mixins, functions, variables, placeholders), CSS resets, icon font, default styles and all components. Visit the documentation site for full details on what's available in the SCSS.

If you want the design system without all of the components you can install the base styling (CSS resets and global ):

@forward "@nice-digital/design-system/scss/base";

You can then start using the SCSS from the NICE Design System, for example:

@use "@nice-digital/nds-core/scss/colours";

.something {
	color: colours.$text;
}

Precompiled

The @nice-digital/design-system npm package includes a dist folder with pre-compiled assets (CSS and JS). These are useful for quick prototypes, but aren't recommended for production because:

  • it uses compiled CSS so you lose the benefit of all the SCSS mixins, function and variables
  • you get everything: you can't pick and choose just what you need.

Use the dist folder as a static directory with Express to serve these precompiled files:

app.use(
	express.static(__dirname + "/node_modules/@nice-digital/design-system/dist/")
);

and then reference it from your HTML as:

<link rel="stylesheet" href="/stylesheets/nice.min.css" type="text/css" />
<script src="/javascripts/nice.min.js"></script>

Note: you'll probably also need to serve the nice-icons icon font if you're doing this: app.use(express.static(__dirname + "/node_modules/@nice-digital/icons/dist/"));.

Alternatively, use a script to copy the precompiled assets out of the node_modules folder to somewhere where you can serve them.

CDN

We are planning on publishing the precompiled version of the Design System to the NICE CDN. Watch this space.