ShakibDShy

Installation

How to install and set up React Button Pro in your project

Installation

Get started with React Checkbox Pro by following these simple steps:

Install the package

Choose your preferred package manager:

npm install @shakibdshy/react-button-pro
# or
yarn add @shakibdshy/react-button-pro
# or
pnpm add @shakibdshy/react-button-pro
# or
bun add @shakibdshy/react-button-pro

Import the component

Import the components in your React application:

import { Button } from '@shakibdshy/react-button-pro';

Setup Tailwind CSS

import buttonPlugin from "@shakibdshy/react-button-pro/plugin";
 
/** @type {import('tailwindcss').Config} */
export default {
  content: [
    // ... your content configuration
    "node_modules/@shakibdshy/react-button-pro/dist/**/*.{js,ts,jsx,tsx}",
  ],
  plugins: [
    buttonPlugin,
    // ... other plugins
  ],
};

Basic usage

Here's a simple example to get you started:

function App() {
  return (
    <Button>
      Click me
    </Button>
  );
}

What's included?

Button Component

The main button component with support for controlled and uncontrolled modes

ButtonGroup Component

Group multiple buttons together with shared state management

useButton Hook

A custom hook for advanced button state management

Built-in Styles

Pre-built styles with Tailwind CSS support and custom CSS options

Plugin

Plugin for Tailwind CSS

Requirements

  • React 18+ (for Hooks support)
  • TypeScript 5.0+ (for type definitions)
  • Tailwind CSS 3.0+ (optional, for default styling)
  • PostCSS 8.0+ (optional, for Tailwind CSS support)

Last updated on

On this page