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

@wmcadigital/ui-button

v0.1.0-alpha.2

Published

Buttons should be used in situations where a user might need to preform an action

Readme

Button

Buttons should be used in situations where a user might need to preform an action

Accessible button components and styling guidelines.

Markup

<button class="ds-button">Primary action</button>

@wmcadigital/ui-button

Button styles and small UX helpers used across the design system. The package provides a flexible .ds-btn block, icon support, and multiple modifiers for variants, alignment, and disabled states.

Install

pnpm add @wmcadigital/ui-button

What this package provides

  • Compiled CSS: dist/styles/main.css (declared in the package style field).
  • SCSS source: src/styles/main.scss (imports loader and design token helpers).
  • A robust .ds-btn block with modifiers for colour, sizing, alignment, and behaviour.

Basic markup

<button class="ds-btn">Primary action</button>

Iconed button example:

<button class="ds-btn">
  <svg class="ds-btn__icon ds-btn__icon--left" aria-hidden="true" width="22" height="22">
    <use href="#icon-add"></use>
  </svg>
  Save
</button>

Common modifiers

  • .ds-btn--primary — primary colour variant.
  • .ds-btn--secondary — bordered/secondary variant (also supports .ds-btn--dark-bg for dark backgrounds).
  • .ds-btn--destructive — destructive/error action style.
  • .ds-btn--start — success-style variant (uses success colour token).
  • .ds-btn--mode — specialised mode buttons with coloured icons (bus/train/etc.).
  • .ds-btn--dark-bg — invert colours for use on dark backgrounds.
  • .ds-btn--favourite — minimal, icon-focused button.
  • .ds-btn--block — full width button.
  • .ds-btn--link — render like a textual link.
  • .ds-is--active — utility class for active state styling.

Alignment helpers:

  • .ds-text-align-left, .ds-text-align-center, .ds-text-align-right — control inline alignment.

Icon helpers:

  • .ds-btn__icon--left and .ds-btn__icon--right — spacing for icons.
  • .ds-swift-logo-inline — helper to style an inline logo/responsive icon.

Disabled states:

  • Disabled modifiers and selector patterns are included (e.g. .ds-btn--disabled:disabled) and should be applied to the native disabled attribute where appropriate.

Accessibility

  • Always provide an accessible label for buttons (visible text or an accessible name via aria-label).
  • Use the native type attribute on button elements (button, submit, reset) to avoid unexpected form submissions.
  • The styles include visible focus states — ensure you maintain focus visibility if you customise the CSS.

Customisation

  • Colours, spacing and tokens are driven by the design system (get-color(...) helpers and SCSS variables). Override variables or apply utility classes to match your theme.
  • The package imports @wmcadigital/ui-loader — the loader integration allows placing a spinner icon inside buttons when needed.

Development

  • Source: src/styles/main.scss.
  • Build from the repo root to regenerate dist/:
pnpm -w -r run build
  • Linting:
pnpm -w -r run lint