1.1.1 • Published 6 years ago

react-linear-gradient-button v1.1.1

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

DEMO

Install

$ npm install react-linear-gradient-button

Usage

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import GradientButton from 'react-linear-gradient-button';

class Basic extends Component {
  render() {
    return <GradientButton>BUTTON</GradientButton>;
  }
}

ReactDOM.render(<Basic />, document.getElementById('root'));

Features

Props

PropsTypeDefaultDescription
childrenString || NodeRequiredContent of the button.
themeString"Vanusa"Gradient theme from uigradients.
disabledBoolfalseShould render a disabled button.
gradient[String]nullArray of colors (e.g., ['#f00b47', '#0f6bb6'], [rgba(255,0,0,0), rgba(255,0,0,1)]).NOTE: this props has higher level then theme.
angleString"right"The angle or direction of linear gradient (e.g., "bottom", "30deg").Check Using Angles section on w3schools/css3_gradients for more information.
paddingNumber || String || [Number] || [String]10The CSS padding argument of the button. Could be an array of four sides, just like CSS.Unit is px.
borderRadiusNumber20The CSS border-radius argument of the button.Unit is px.
borderWidthNumber2The CSS border-width argument of the button.Unit is px.
backgroundString"#fff"The CSS background-color argument of the button.
colorString"#ae3560"The CSS color argument of the button.
fontSizeNumber16The CSS font-size argument of the button.
transitionObjectSee followingThe CSS transition argument of the button.
transition.propertyString"all"The CSS transition-property argument of the button.
transition.durationNumber0.2The CSS transition-duration argument of the button.Unit is second.
transition.timingFunctionString"ease-in-out"The CSS transition-timing-function argument of the button.
transition.delayNumber0The CSS transition-delay argument of the button.Unit is second.

License

MIT © xxhomey19