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

@manikandan.palani/rpl-button

v1.0.0

Published

RPL Design System Button Component - React button component with Figma design specifications

Readme

@rpl/button

A modern, accessible button component built with React and TypeScript, following Figma design specifications.

Features

  • 🎨 8 button variants (Primary, Secondary, Tertiary, Destructive variants, Link)
  • 📏 4 size options (sm, md, lg, xl)
  • ♿ Accessible with proper ARIA attributes
  • 🔄 Loading states with spinners
  • 🎯 Icon support (left or right positioning)
  • 📱 Responsive design
  • 🎨 CSS custom properties for easy theming

Installation

npm install @rpl/button

Usage

Basic Usage

import { Button } from '@rpl/button';

function App() {
  return (
    <div>
      <Button type="primary" size="md">
        Click me
      </Button>
      
      {/* Alternative using label prop for Figma compatibility */}
      <Button type="primary" size="md" label="Click me" />
    </div>
  );
}

With Icons

import { Button, PlusIcon, ChevronRightIcon } from '@rpl/button';

function App() {
  return (
    <div>
      <Button 
        type="primary" 
        size="md" 
        iconLeft={<PlusIcon />}
      >
        Add Item
      </Button>
      
      <Button 
        type="secondary" 
        size="md" 
        iconRight={<ChevronRightIcon />}
      >
        Continue
      </Button>
    </div>
  );
}

Loading State

import { Button } from '@rpl/button';

function App() {
  const [loading, setLoading] = useState(false);
  
  return (
    <Button 
      type="primary" 
      size="md" 
      loading={loading}
      onClick={() => setLoading(true)}
    >
      Submit
    </Button>
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | type | 'primary' \| 'primary-destructive' \| 'secondary' \| 'secondary-destructive' \| 'tertiary' \| 'tertiary-destructive' \| 'link' \| 'link-destructive' | 'primary' | Button variant style | | size | 'sm' \| 'md' \| 'lg' \| 'xl' | 'md' | Button size | | children | ReactNode | - | Button content (text or elements) | | label | string | - | Alternative to children for Figma compatibility | | iconLeft | ReactNode | - | Icon to display on the left side | | iconRight | ReactNode | - | Icon to display on the right side | | loading | boolean | false | Show loading spinner | | disabled | boolean | false | Disable button interaction | | onClick | (event: MouseEvent) => void | - | Click event handler | | className | string | - | Additional CSS classes | | ...props | ButtonHTMLAttributes<HTMLButtonElement> | - | All standard button HTML attributes |

Button Types

Primary Buttons

  • primary - Main call-to-action button (blue)
  • primary-destructive - Critical actions (red)

Secondary Buttons

  • secondary - Secondary actions with border
  • secondary-destructive - Secondary critical actions

Tertiary Buttons

  • tertiary - Subtle actions without border
  • tertiary-destructive - Subtle critical actions

Link Buttons

  • link - Text-only link style
  • link-destructive - Text-only critical link style

Available Icons

The package includes these commonly used icons:

  • ChevronRightIcon
  • ChevronLeftIcon
  • PlusIcon
  • CheckIcon
  • DownloadIcon
  • TrashIcon
  • EditIcon
import { Button, PlusIcon, TrashIcon } from '@rpl/button';

<Button type="primary" iconLeft={<PlusIcon />}>Add</Button>
<Button type="tertiary-destructive" iconLeft={<TrashIcon />}>Delete</Button>

Styling

The component uses CSS custom properties for easy theming. You can override these in your CSS:

:root {
  --rpl-color-primary: #003e82;
  --rpl-color-destructive: #c80e11;
  --rpl-color-border: #d1d5db;
  --rpl-color-text: #1f2937;
  /* ... other custom properties */
}

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

TypeScript

This package includes TypeScript definitions. No additional @types package needed.

License

MIT

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Add tests for new features
  4. Submit a pull request

Support

For issues and questions, please open an issue on the repository.