Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@acodez/button

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acodez/button

react button component with custom styles

  • 1.1.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

@acodez/button

npm_version license

React button component with plenty of customization.


  • Installation
  • PropsAPI
  • Usage

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>

Keywords

FAQs

Package last updated on 07 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc