buttongroups-library
v1.0.45
Published
button group icons
Downloads
10
Readme
Button Groups Library
The Button Groups library provides a range of customizable and stylized button groups for React applications.
Installation
You can install the Button Groups library using npm or yarn:
npm install buttongroups-library
or
yarn add buttongroups-library
Usage
Import the ButtonGroup component in your React application:
Implementing Button Groups
The library offers a ButtonGroup component to create a group of buttons. Users can specify the isRounded prop to control the button group's corner style.
import React from 'react'; import { ButtonGroup } from 'buttongroups-library';
const MyComponent = () => { return ( ); };
export default MyComponent;
ButtonGroup Component Props
The ButtonGroup component accepts the following props:
isRounded (optional): Determines if the buttons should have rounded corners. By default, it's set to true.
Styling
The library includes CSS classes to style the button group and button components. Users can also add custom CSS to further modify the appearance.
ButtonOption Component
The ButtonOption component is used internally within the ButtonGroup and supports the following props:
label: The text to be displayed on the button. isActive: Indicates whether the button is active or not. onClick: Function to execute when the button is clicked.
Dependencies
The Button Groups library relies on the following dependencies:
@babel/cli, @babel/core, @babel/preset-env, @babel/preset-react, babel-loader: Babel dependencies for transpiling. css-loader, style-loader: Loaders for handling CSS files. react: React library. webpack, webpack-cli: Bundling and build tools.