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

dcs-design-system

v2.3.1

Published

Design system for Digital NSW

Downloads

1

Readme

NSW Design System

NSW Design system is a collection of reusable UI components used on the NSW goverment websites.

See live examples of NSW Digital Design system components and guidance on how to use them on you website at NSW Design System.

Using the design system

How you use the NSW Design System depends on your team's capabilities. We recommend using npm but also provide a downloadable starter kit which includes all the compiled assets.

  1. Installing with NPM
  2. Download starter kit

Installing with NPM

npm is a package manager for Node-based projects. We recommend npm packages because it makes it easy to update and install the design system from the command line.

  1. Install Node/npm.

  2. Generate a package.json file using the npm init command in the terminal. You will be prompted to enter several pieces of information, like the name of your application, version, description etc.

  3. Add nsw-design-system to your project’s package.json:

    • npm install --save nsw-design-system

The NSW Design System is now installed as a dependancy of your project, check out how to import styles and javascript in to your project build.

Download starter kit

You can download the compiled design system assets (HTML, CSS, JavaScript) in the HTMLStarterkit zip file from the latest release.

Importing styles into your project

The NSW Design System styles need to be added to the main Sass file in your project.
Use the below snippet to import the NSW Design System (ideally placed before any other imports or sass):

@import 'node_modules/nsw-design-system/src/main';

Importing javascript into your project

Some of the NSW Design System components require javascript to provide advanced functionality. To ensure the page is ready for javascript to run, include the follow scripts tags at the end of the html document.

    <script src="node_modules/nsw-design-system/src/main.js"></script>
    <script>window.NSW.initSite()</script>
  </body>
</html>

You might wish to copy the file into your project or reference it from node_modules, this will depend on your build setup.

Getting updates

To be notified when there’s a new release, you can either join the NSW Design System community or watch the NSW Design System Github