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

@commercetools-uikit/secondary-button

v20.3.1

Published

Secondary buttons are used in combination with a PrimaryButton and represent the secondary action.

Readme

Buttons: Secondary Button

Description

Secondary buttons are used in combination with a PrimaryButton given a converse secondary action on a page. You must also pass a label for accessibility reasons.

Usage

import SecondaryButton from '@commercetools-uikit/secondary-button';

<SecondaryButton
  iconLeft={<InformationIcon />}
  label="Alerts a message"
  onClick={() => alert('Button clicked')}
/>;

Properties

| Props | Type | Required | Values | Default | Description | | ------------------ | --------------------- | :------: | --------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | label | string | ✅ | - | - | Should describe what the button does, for accessibility purposes (screen-reader users) | | iconLeft | node | - | - | - | The left icon displayed within the button | | iconRight | node | - | - | - | The right icon displayed within the button | | isToggleButton | bool | ✅ | - | false | If this is active, it means the button will persist in an "active" state when toggled (see isToggled), and back to normal state when untoggled | | isToggled | bool | - | - | - | Tells when the button should present a toggled state. It does not have any effect when isToggleButton is false | | theme | string | - | default, info | default | The component may have a theme only if isToggleButton is true. This property has been deprecated in favor of tone. | | tone | string | - | secondary, info | secondary | Indicates the color scheme of the button | | size | string | - | 'medium' , 'big' | 'big' | Indicates the size of the button. | | isDisabled | bool | - | - | - | Tells when the button should present a disabled state | | buttonAttributes | object | - | - | - | Allows setting custom attributes on the underlying button html element | | type | string | - | submit, reset, button | button | Used as the HTML type attribute. | | onClick | func | | - | - | What the button will trigger when clicked | | to | string or object | - | - | - | Where the button should redirect when clicked | | as | string or element | - | - | - | You may pass in a string like "a" to have the button render as an anchor tag instead. Or you could pass in a React Component, like a Link. |

The component further forwards all valid HTML attributes to the underlying button component.

Main Functions and use cases are:

  • Secondary action example: Discard changes

  • Restoring state example: Canceling a form