1.0.1 • Published 6 years ago

react-awesome-button-namdaoduy v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

<AwesomeButton />

Travis NPM

react-awesome-button is a performant, extendable, highly customisable, production ready React Component that renders an animated set of 3D UI buttons.

Live demo

Checkout the CSS customizer at my portfolio

Examples

With react-awesome-button and plain CSS

  import { AwesomeButton } from 'react-awesome-button';
  import 'react-awesome-button/dist/styles.css';

  function Button() {
    return (
      <AwesomeButton type="facebook">Button</AwesomeButton>
    );
  }

With react-awesome-button CSS Modules

  import { AwesomeButton } from 'react-awesome-button';
  import AwesomeButtonStyles from 'react-awesome-button/src/styles/styles.scss'

  function Button() {
    return (
      <AwesomeButton
        cssModule={AwesomeButtonStyles}
        type="twitter"
      >
        Share
      </AwesomeButton>
    );
  }

Key Features

  • Look and feel customisable and extendable via SASS variables and lists (scss config file)
  • Use it with CSSModules or Plain CSS (NO inline-styles)
  • Render any tag as the component\'s child (text, icon, img, svg)
  • Animated progress button
  • OnClick bubble animation
AttributesTypeDefaultDescription
actionfunctionnullDefault click function
bubblesboolfalseShould render the bubbles onClick animation
disabledboolfalseShould render a disabled button
typestringprimaryRender a specific button type, styled by the .scss type list
sizestringautoRender a specific button size, styled by the .scss size list
elementnodenullOverwrites the default container element renderer, useful for using it with react-router Link container.
hrefstringnullForces the button to be rendered on an anchor container and sets the href to the specified value
targetstringnullRender an anchor with a specific target attribute
progressboolfalseShould render a progress button
loadingLabelstringWait ..Progress button loading label text
errorLabelstringErrorProgress button error label text
successLabelstringSuccessProgress button success label text
visiblebooltrueShould the button be visible

Author

Rafael Caferati

  • Checkout my Full-Stack Web Developer Website
  • Other open source projects @ Code Laboratory
  • A scope of my work @ Web Portfolio

License

MIT. Copyright (c) 2017 Rafael Caferati.