0.1.6 • Published 3 years ago

react-native-scientific-calculator v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

React Native Scientific Calculator

Installation

Using npm:

npm i react-native-scientific-calculator

or yarn:

yarn add react-native-scientific-calculator

Usage

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

const App = () => {
    return (
        <View style={{flex: 1}}>
            <Calculator
                showLiveResult={true} 
                scientific={true}
                theme="dark"
                customize={{
                    borderRadius: 5,
                    spacing: 2
                }}
            />
        </View>
    )
}

export default App;

Screenshots

Light Theme - StandardDark Theme - StandardDark Theme - Scientific
alt Select Packagealt Select Packagealt Select Package

Props

Prop NameData TypeDefault ValueDescription
themestringlightChoose between light and dark themes
scientificbooleanfalseToggle between standard & scientific calculator
showLiveResultbooleanfalseToggle live calculation preview
hapticsbooleantrueEnable vibration on button press
customizeObjectCustomize text & background colors. See below for list of possible customizations

Customizations

Prop NameData TypeDescription
borderRadiusnumberborder radius of buttons
spacingnumberspacing between buttons
fontSizenumberbutton font size
exprFontSizenumberexpression font size
bgstringCalculator background color
buttonBgstringButton background color
previewBgstringLive calculations preview panel background color
borderColorstringBackground color of space between buttons
equalsBgstringEquals button background color
clearBgstringClear button background color
numberBgstringNumber buttons background color
displayBgstringResults panel background color
buttonTextColorstringButton texxt color
numberButtonTextColorstringNumber button text color
clearButtonTextColorstringClear button text color
equalsButtonTextColorstringEquals button text color
previewTextColorstringPreview text color
expressionTextColorstringExpression text color

Demo

Download Expo Go and scan the QR code to get started

alt Snack Demo

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago