Giter Site home page Giter Site logo

baselnsralla / react-native-really-awesome-button Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rcaferati/react-native-really-awesome-button

0.0 1.0 0.0 3.75 MB

🎆 React Native 60fps extendable, production ready component that renders an animated set of 3D UI buttons.

Home Page: https://expo.io/@rcaferati/react-native-really-awesome-button

License: MIT License

JavaScript 100.00%

react-native-really-awesome-button's Introduction

React Native <AwesomeButton />

Travis NPM

react-native-really-awesome-button is a performant, extendable, production ready ReactNative component that renders an animated set of 3D UI buttons.

Run the live demo @ expo.io

Installation

npm install --save react-native-really-awesome-button

or

yarn add react-native-really-awesome-button

Usage

Basic

  import AwesomeButton from 'react-native-really-awesome-button';

  function Button() {
    return (
      <AwesomeButton>Text</AwesomeButton>
    );
  }

Progress

  import AwesomeButton from 'react-native-really-awesome-button';

  function Button() {
    return (
     <AwesomeButton
       progress
       onPress={(next) => {
         /** Do Something **/
         next();
       }}
     >
       Text
     </AwesomeButton>
    );
  }

Custom Children

  import AwesomeButton from 'react-native-really-awesome-button';

  function Button() {
    return (
     <AwesomeButton>
       <Image source="require('send-icon.png)" />
       <Text>Send it</Text>
     </AwesomeButton>
    );
  }

Importing a specific theme

  import AwesomeButtonRick from 'react-native-really-awesome-button/src/themes/rick';

  function Button() {
    return (
     <AwesomeButtonRick type="primary">Rick's Primary Button</AwesomeButtonRick>
     <AwesomeButtonRick type="secondary">Rick's Secondary Button</AwesomeButtonRick>
    );
  }

Props

Attributes Type Default Description
onPress               Func       null Button onPress function
style                 Style       null   Button container custom styles
raiseLevel number 4 Buttom 3D raise level
height number 50 Button height
width number 200 Button width
borderRadius number 4 Button border-radius
borderWidth number 0 Button border-width
borderColor string null Button border-color
backgroundColor string #C0C0C0 Button main background-color
backgroundDarker string #9F9F9F Button frontal darker background-color
textColor string #FFFFFF Button default label text color
textSize number 16 Button default label text font-size
textLineHeight number 20 Button default label text line-height
activityColor string #FFFFFF Progress button error label text
progress             bool       "Success" Enable progress animation
springAnimation       bool       false Enable spring animation
disabled bool true Button disabled state: cancels animation and onPress func

Author

Rafael Caferati

License

MIT. Copyright (c) 2018 Rafael Caferati.

react-native-really-awesome-button's People

Contributors

rcaferati avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.