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

@nl-design-system-candidate/button-react

v1.0.0

Published

React implementation of the NL Design System Button component

Downloads

240

Readme

Button React

Provides the ability to perform an action.

Installation

Using npm

npm install @nl-design-system-candidate/button-react

Using pnpm

pnpm add @nl-design-system-candidate/button-react

Using yarn

yarn add @nl-design-system-candidate/button-react

Usage

If you want the React component with styles

import { Button } from '@nl-design-system-candidate/button-react/css';

<Button>Click here!</Button>;

If you just want the React component and import the styles separately

import { Button } from '@nl-design-system-candidate/button-react';

<Button>Click here!</Button>;

Variants

Primary Button

Button that indicates a primary action. It is the most logical choice in a flow. Use primary buttons sparingly. Too many primary buttons on the screen can be confusing for the user. Optionally, a hint can be provided.

<Button label="Primary Button" purpose="primary" />

Primary Button with hint="positive"

Indicates a positive or successful outcome. For example, an action to create something.

<Button hint="positive" label="Send form" purpose="primary" />

Primary Button with hint="negative"

Indicates a negative or destructive result. For example, an action to permanently remove something.

<Button hint="negative" label="Delete this file" purpose="primary" />

Secondary Button

Button that indicates a secondary action. It is often used for buttons that are an alternative to the primary action. Optionally, a hint can be provided.

<Button label="Secondary Button" purpose="secondary" />

Secondary Button with hint="positive"

Indicates a positive or successful outcome. For example, an action to create something.

<Button hint="positive" label="Save and continue later" purpose="secondary" />

Secondary Button with hint="negative"

Indicates a negative or destructive result. For example, an action to change the visability of something.

<Button hint="negative" label="Publish" purpose="secondary" />

Subtle Button

Button that isn't immediately attention-grabbing. It is often used in busy interfaces with lots of actions. Optionally, a hint can be provided.

<Button label="Subtle Button" purpose="subtle" />

Subtle Button with hint="positive"

Indicates a positive or successful outcome. For example, an action to create something.

<Button hint="positive" label="Yay" purpose="subtle" />

Subtle Button with hint="negative"

Indicates a negative or destructive result. For example, an action to change the visability of something.

<Button hint="negative" label="Nay" purpose="subtle" />

Button with iconStart

A button with an icon before the label. Using an SVG icon with fill="currentColor" is recommended.

<Button iconStart={<ExampleIconArrowLeft />} label="Previous" />

Button with iconEnd

A button with an icon after the label. Using an SVG icon with fill="currentColor" is recommended.

<Button iconEnd={<ExampleIconArrowRight />} label="Next" />

Button with iconOnly

A button with only an icon. The label is not visible, but it is present for accessibility. Using an SVG icon with fill="currentColor" is recommended.

<Button iconOnly iconStart={<ExampleIconIdea />} label="Get a hint" />

or even with two icons

<Button iconOnly iconStart={<ExampleIconPlus />} iconEnd={<ExampleIconShoppingCart />} label="Add to basket" />

Pressed and Toggle Button

A Button that indicates a pressed state, even if the user is not currently interacting with it.

Use the pressed property to indicate the visible state, and toggle when assitive software should track the current state of the button.

Disabled

Note: We have NL Design System guidelines that warn about the use of the Disabled button for submit actions.

To make a Button inactive you can use the disabled property. This will add disabled styling and set aria-disabled="true". We do not set the native disabled property, because otherwise the Button will no longer be focussable, even with tabindex="0".

When using a Disabled Button the onClick handler can be used to ensure the button will no longer respond to clicks.

Do you really need the native disabled attribute? Use the htmlDisabled property instead, but know it will cause accessibility issues.

Design Tokens

All NL Design System components are white label. Use Button design tokens to ensure it matches your brand styles. https://nldesignsystem.nl/handboek/huisstijl/design-tokens/.

The tokens used for Button can be found in the tokens documentation @nl-design-system-candidate/button-tokens.

Other implementations

Want to use the Button with other frameworks or vanilla JavaScript? The React component is based on @nl-design-system-candidate/button-css.

Figma, Storybook and more

Read more about the Button in Dutch and find links to other resources like Figma and Storybook on https://nldesignsystem.nl/button.