All Projects → budiadiono → react-native-calculator

budiadiono / react-native-calculator

Licence: other
React Native Calculator and Calculator Input Component

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to react-native-calculator

rich input
Rich input box, implement @Someone and subject with color highlighting
Stars: ✭ 58 (+152.17%)
Mutual labels:  input
calcuMLator
An intelligently dumb calculator that uses machine learning
Stars: ✭ 30 (+30.43%)
Mutual labels:  calculator
rclc
Mathematical expression calculator with big integers, floats, common fractions, and complex numbers support
Stars: ✭ 24 (+4.35%)
Mutual labels:  calculator
file-upload-with-preview
🖼 Simple file-upload utility that shows a preview of the uploaded image. Written in TypeScript. No dependencies. Works well with or without a framework.
Stars: ✭ 406 (+1665.22%)
Mutual labels:  input
LoanJS
Calculate loan in js (browser/node.js) for equal installments, installments decreasing, the sum of interest, etc.
Stars: ✭ 20 (-13.04%)
Mutual labels:  calculator
placeholder-animated
Input com placeholder animado, cujo funcionamento é semelhante ao login do Google
Stars: ✭ 19 (-17.39%)
Mutual labels:  input
Binary-Calculator-JavaScript
📱 A handy Calculator for Binary operations, that works on all Devices 📱 💻 🖥 | ⛓ https://play.google.com/store/apps/details?id=com.binarycalculator.ayidouble.binarycalculator.app ⛓
Stars: ✭ 45 (+95.65%)
Mutual labels:  calculator
rawtx
A Golang module that helps you answer questions about raw Bitcoin transactions, their inputs, outputs and scripts.
Stars: ✭ 12 (-47.83%)
Mutual labels:  input
Desktop-Applications-JavaFX
JavaFX Open Source Projects
Stars: ✭ 69 (+200%)
Mutual labels:  calculator
awesome-calculators
😎 A curated list of resources related to calculators!
Stars: ✭ 97 (+321.74%)
Mutual labels:  calculator
angular-code-input
Code (number/chars/otp/password) input component for angular 7, 8, 9, 10, 11, 12+ projects including Ionic 4, 5 +
Stars: ✭ 112 (+386.96%)
Mutual labels:  input
dynamic-input-fields-reactjs
Example of the dynamic input fields in ReactJS
Stars: ✭ 31 (+34.78%)
Mutual labels:  input
read input
A simple CLI tool that asks for user input until the data inputted is valid.
Stars: ✭ 13 (-43.48%)
Mutual labels:  input
hookahjs
Add empty/dirty/touched CSS hooks to input and textarea elements automatically (1056 bytes)
Stars: ✭ 21 (-8.7%)
Mutual labels:  input
dino-run-ce
A clone of Google Chrome's dinosaur game for the TI-84+CE
Stars: ✭ 14 (-39.13%)
Mutual labels:  calculator
react-simple-range
🔉 React slider component for inputting a numeric value within a range.
Stars: ✭ 20 (-13.04%)
Mutual labels:  input
gpacalculator
GPA Calculator for IIITA Curriculum
Stars: ✭ 39 (+69.57%)
Mutual labels:  calculator
eseed-window
A minimal cross-platform C++17 window management library for rendering (deprecated)
Stars: ✭ 18 (-21.74%)
Mutual labels:  input
binance-profit-calculator
Just some Trade History import tool to see how much profit you made. If you have bags (unsold coins) it tries to take those into account as well.
Stars: ✭ 30 (+30.43%)
Mutual labels:  calculator
Shell-Scripts
Shell scripts about some basic topics, current time, calculator, sorting, restaurant and more.
Stars: ✭ 100 (+334.78%)
Mutual labels:  calculator

React Native Calculator

npm version build status

Simple react native calculator and calculator input component.

Installation

Using npm:

npm i -S react-native-calculator

or yarn:

yarn add react-native-calculator

Demo

Calculator Component

react-native-gifted-chat react-native-gifted-chat

Usage

import React from 'react'
import { View } from 'react-native'
import { Calculator } from 'react-native-calculator'

export default class App extends React.Component {
  render() {
    return (
      <View style={{ flex: 1 }}>
        <Calculator style={{ flex: 1 }} />
      </View>
    )
  }
}

Props

All props in common props and...

Prop Name Data Type Default Value Description
hasAcceptButton boolean false Show accept button after calculate.
style ViewStyle Container style.
onCalc (value : number , text : string ) => void Calculate button click event.
onAccept (value : number , text : string ) => void Accept button click event.
hideDisplay boolean false Hide display text field.

Calculator Input Component

react-native-gifted-chat

Usage

import React from 'react'
import { View } from 'react-native'
import { CalculatorInput } from 'react-native-calculator'

export default class App extends React.Component {
  render() {
    return (
      <View>
        <CalculatorInput
          fieldTextStyle={{ fontSize: 24 }}
          fieldContainerStyle={{ height: 36 }}
        />
      </View>
    )
  }
}

Props

All props in common props and...

Prop Name Data Type Default Value Description
modalAnimationType 'none' 'slide' 'fade'
modalBackdropStyle ViewStyle Style of modal backdrop.
fieldContainerStyle ViewStyle Text field container style.
fieldTextStyle TextStyle Text style.
onChange (value : number , text : string ) => void Value change event.
prefix string Prefix.
suffix string Suffix.
onBeforeChange (value : number , text : string ) => boolean Called before changes applied. Return true if changes are accepted.
onBeforeChangeAsync (value : number , text : string ) => Promise<boolean> Called asynchronously before changes applied. Resolve with true if changes are accepted.

Common Props

Prop Name Data Type Default Value Description
decimalSeparator string . Decimal separator sign.
thousandSeparator string , Thousand separator sign.
numericButtonBackgroundColor string #ffffff Numeric button background color.
numericButtonColor string #aaaaaa Numeric text button color.
actionButtonBackgroundColor string #e7e5e3 Action button background color.
actionButtonColor string #000000 Action text button color.
calcButtonBackgroundColor string #ff8d00 Calculate button background color.
calcButtonColor string #ffffff Calculator text button color.
acceptButtonBackgroundColor string #14CC60 Accept button background color.
acceptButtonColor string #ffffff Accept text button color.
displayBackgroundColor string #ffffff Digit display background color.
displayColor string #000000 Digit display text color.
borderColor string #52525B Border color.
fontSize number 18 Button text font size.
value number 0 Initial value.
width number (auto) Calculator component width.
height number (auto) Calculator component height.
displayHeight number (auto) Digit display container height.
keyboardHeight number (auto) Keyboard container height.
onTextChange (text: string) => void Text change event.
displayTextAlign "auto" / "left" / "right" / "center" / "justify" "left" Digit align display.
noDecimal boolean false Hide decimal separator button to disable decimal value.
roundTo number 2 How many decimal places to round the value

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].