1.1.5 • Published 3 years ago

@acodez/button v1.1.5

Weekly downloads
36
License
ISC
Repository
-
Last release
3 years ago

@acodez/button

npm_version license

React button component with plenty of customization.



Installation

npm install @acodez/button

Props API

PropertyTypeRequiredDefault valueDescription
btnSizestringnomdsize of the button, choose from xs, sm,md, lg
btnColorstringnoprimarycolor scheme of the button, choose from primary, secondary, danger, warning, success, info, dark, light
btnTypestringnotextWithIcontextWithIcon, icon, spinner, or text
btnStylestringnosolidbutton style, solid, outline, or transparent
btnBorderstringnoroundborder radius, round or square
btnWidthstringnoautobutton width, auto or full
btnIconPosstringnoleftbutton icon position, left or right

Usage

import Button from "@acodez/button";

<Button 
    btnColor="primary" // 'info', 'success', 'danger', 'warning', 'light', 'dark'
    btnSize="sm" // 'xs', 'md', 'lg'
    btnBorder="round" // 'square'
    btnStyle="solid" // 'outline', 'transparent'
    btnWidth="auto" // 'full'
    btnIconPos="left" // 'right'
    btnType="textWithIcon" // 'text', 'icon', 'spinner'
    >
    Button
</Button>

btnSize
Use btnSize property to adjust size/width of the button.
Options- 'xs', 'sm', 'md', 'lg'.
Default value - 'md'
Example:

<Button btnSize="md">Button</Button>

btnColor
Use btnColor property to adjust color scheme of the button.
Options- 'primary', 'secondary', 'warning', 'danger', 'info', 'light', 'dark'.
Default value - 'primary'
Example:

<Button btnColor="primary">Button</Button>

btnType
Use btnType property when you want to use button as icon only or for a spinner.
Options- 'textWithIcon', 'text', 'icon', 'spinner'.
Default value - 'textWithIcon'
Example:

<Button btnType="spinner">
    <i className="ion-load-a"></i> // your spinner icon or image.
</Button>

btnStyle
Use btnStyle to change the overall style/appearance of the button.
Options- 'solid', 'outline', 'transparent'.
Default value - 'solid'
Example:

<Button btnStyle="outline">Button</Button>

btnBorder
Use btnBorder to change the border radius of the button.
Options- 'square', 'round'.
Default value - 'round'
Example:

<Button btnBorder="square">Button</Button>

btnWidth
Use btnWidth to change the button to auto width or full width.
Options- 'auto', 'full'.
Default value - 'auto'
Example:

<Button btnWidth="full">Button</Button>

btnIconPos
Use btnIconPos to change the icon position to left or right side of of the text.
Options- 'left', 'right'.
Default value - 'left'
Example:

<Button btnIconPos="right">
    <i className="ion-ios-arrow-thin-right"></i>
    Login Now
</Button>

link
Change button to a link (href).
Example:

<Button link="/innerPage">
    Click to view!
</Button>
1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago