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

@pmwcs/button

v1.1.0

Published

PMWCS button component

Downloads

15

Readme

Buttons

Buttons communicate the action that will occur when the user touches them.

  • Module @pmwcs/button
  • Import styles:
    • Using CSS Loader
      • import '@pmwcs/button/styles';
    • Or include stylesheets
      • '@material/button/dist/mdc.button.css'
      • '@pmwcs/@pmwcs/icon/icon.css'
      • '@material/ripple/dist/mdc.ripple.css'
  • MDC Docs: https://material.io/develop/web/components/buttons/
<Button label="Button" />
<>
  <Button label="Icon" icon="favorite" />
  <Button label="Trailing" trailingIcon="keyboard_arrow_right" />
  <Button label="Loading" icon={<CircularProgress />} />
</>
<>
  <Button label="Raised" raised />
  <Button label="Unelevated" unelevated />
  <Button label="Outlined" outlined />
  <Button label="Dense" dense />
  <Button label="No Ripple" ripple={false} />
</>
<>
  <Button label="Danger" danger raised />
  <Button label="Danger" danger outlined />
  <Button label="Danger" danger />
</>
<>
  <Button
    label="With Theme"
    raised
    theme={['secondaryBg', 'onSecondary']}
  />
  {/**
    This example uses "accent" to control the color of the Ripple.
    See the documentation on Ripples.
  */}
  <Button label="With Theme" theme="secondary" />
</>
<Button>
  {/** Alternatively pass content as children */}
  As Children
</Button>

Button

The Button component.

Props

| Name | Type | Description | |------|------|-------------| | children | React.ReactNode | Content specified as children. | | danger | undefined \| false \| true | Used to indicate a dangerous action. | | dense | undefined \| false \| true | Make the Button dense. | | disabled | undefined \| false \| true | Make the button disabled | | activated | undefined \| false \| true | Make the button activated | | icon | PMWCS.IconPropT | An Icon for the Button | | label | React.ReactNode \| any | Content specified as a label prop. | | primary | undefined \| false \| true | Make the button primary. | | secondary | undefined \| false \| true | Make the button secondary. | | outlined | undefined \| false \| true | Make the button outlined. | | raised | undefined \| false \| true | Make the Button raised. | | ripple | RipplePropT | Adds a ripple effect to the component | | trailingIcon | PMWCS.IconPropT | A trailing icon for the Button | | unelevated | undefined \| false \| true | Make the button unelevated. |

References

  • https://material-components.github.io/material-components-web-catalog/#/component/button