0.2.3 • Published 6 months ago

react-component-library-bobi v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

React Component Library

A modern, lightweight React component library built with TypeScript and Vite, designed for easy integration into React applications.

npm version License: MIT

Features

  • 🚀 Lightweight and optimized bundle
  • 📦 Tree-shakeable components
  • 🔧 TypeScript support with full type definitions
  • 🎨 Customizable styling
  • ⚡ Built with Vite for fast development and optimized builds

Installation

# npm
npm install react-component-library-bobi

# yarn
yarn add react-component-library-bobi

# pnpm
pnpm add react-component-library-bobi

Usage

import React from "react";
import { Button, Input } from "react-component-library-bobi";

function App() {
  return (
    <div>
      <Button label="Click Me" onClick={() => console.log("Button clicked!")} />

      <Input
        placeholder="Enter text..."
        onChange={(e) => console.log("Input changed:", e.target.value)}
      />
    </div>
  );
}

Components

Button

A customizable button component.

import { Button } from "react-component-library-bobi";

<Button label="Submit" onClick={handleSubmit} disabled={isLoading} />;

Props

PropTypeDefaultDescription
labelstringrequiredButton text
onClickfunctionundefinedClick handler
type'button' | 'submit' | 'reset''button'Button type
disabledbooleanfalseDisabled state
classNamestring''Additional CSS class
childrenReactNodeundefinedChild elements

Input

A customizable input component.

import { Input } from "react-component-library-bobi";

<Input
  placeholder="Username"
  value={username}
  onChange={handleUsernameChange}
  name="username"
/>;

Props

PropTypeDefaultDescription
placeholderstring''Input placeholder
valuestring''Input value
namestring''Input name
typestring'text'Input type
onChangefunctionundefinedChange handler
disabledbooleanfalseDisabled state
classNamestring''Additional CSS class

Development

# Install dependencies
npm install

# Start development server
npm run dev

# Run example app
npm run start:example

# Build the library
npm run build

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

0.2.3

6 months ago

0.2.2

6 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.1.9

6 months ago

0.1.8

6 months ago

0.1.7

6 months ago

0.1.6

6 months ago

0.1.5

6 months ago

0.1.4

6 months ago

0.1.3

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago