0.6.0 • Published 5 years ago

react-native-material-buttons v0.6.0

Weekly downloads
13,005
License
BSD-3-Clause
Repository
github
Last release
5 years ago

react-native-material-buttons

npm license

Material buttons with consistent behaviour on iOS and Android

example

Features

  • Easy to use
  • Consistent look and feel on iOS and Android
  • Animated state transitions
  • Ripple animation on touch
  • Pure javascript implementation

Installation

npm install --save react-native-material-buttons

Usage

import React, { Component } from 'react';
import { TextButton, RaisedTextButton } from 'react-native-material-buttons';

class Example extends Component {
  _onPress = ({ id }) => {
    console.log(`${id} pressed`);
  };

  render() {
    let payload = { id: 'button-1' };

    return (
      <RaisedTextButton title='touch me' onPress={this._onPress} payload={payload} />
    );
  }
}

Common properties

namedescriptiontypedefault
colorButton colorStringrgb(224, 224, 224)
disabledColorButton color for disabled stateStringrgb(240, 240, 240)
shadeColorButton shade color for focused stateStringrgb(0, 0, 0)
shadeOpacityButton shade opacity for focused stateNumber0.12
shadeBorderRadiusButton shade border radiusNumber2
focusAnimationFocus animation stateAnimated.Value-
disableAnimationDisable animation stateAnimated.Value-
focusAnimationDurationFocus animation duration in msNumber225
disableAnimationDurationDisable animation duration in msNumber225
disabledButton availabilityBooleanfalse
onPressTouch up callbackFunction-
payloadPayload object for onPress callbackAny-

Other Ripple properties will also work

TextButton properties

namedescriptiontypedefault
titleButton titleString-
titleColorButton title colorStringrgb(0, 0, 0)
disabledTitleColorButton title color for disabled stateStringrgba(0, 0, 0, .26)
titleStyleButton title styleObject-

RaisedTextButton properties

namedescriptiontypedefault
titleButton titleString-
titleColorButton title colorStringrgb(66, 66, 66)
disabledTitleColorButton title color for disabled stateStringrgba(0, 0, 0, .26)
titleStyleButton title styleObject-

Example

git clone https://github.com/n4kz/react-native-material-buttons
cd react-native-material-buttons/example
npm install
npm run ios # or npm run android

Copyright and License

BSD License

Copyright 2017-2019 Alexander Nazarov. All rights reserved.

react-native-material-dropdown-v3react-native-material-dropdown-edot@infinitebrahmanuniverse/nolb-react-native-ma@everything-registry/sub-chunk-2583@softmedialab/react-native-material-dropdown@recursiva-gmd-explore/react-native-material-dropdown@laurabeatris/react-native-dropdown-autocomplete@nafplann/react-native-dropdown-autocomplete@mopinion-mobile/react-native-material-dropdown@nextgencodecompany/react-native-dropdown-autocomplete@tools-alive-react/react-native-material-dropdown@anasmasood94/react-native-material-dropdownreact-native-dropdown-autocompletereact-native-dropdown-autocomplete-revisedreact-native-handoff-dropdownreact-native-loyalty-harareact-native-loyalty-memberreact-native-search-material-dropdownreact-native-searchable-material-dropdownreact-native-material-dropdownreact-native-material-dropdown-axelreact-native-material-dropdown-customizable-dropdown-itemreact-native-material-dropdown-dgjoyreact-native-material-dropdown-fix-v1react-native-material-dropdown-multiplereact-native-material-dropdown-w-render-propsreact-native-material-dropdown-yayareact-native-material-dropdown-rn060react-native-material-dropdown-rwreact-native-material-dropdown-smartlifereact-native-material-dropdown-updatereact-native-material-dropdown-upgradedreact-native-material-dropdown-v2react-native-material-dropdown-v2-fixedreact-native-material-dropdown-v2-roboreact-native-mat-dropdownreact-tungva-autocompletern-material-dropdowndotpay_dropdown@magicfun1241/react-native-material-dropdown
0.6.0

5 years ago

0.5.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago