All Projects → melihmucuk → react-native-flat-button

melihmucuk / react-native-flat-button

Licence: MIT license
Flat button component for react-native

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-flat-button

sleek button
A simple but yet customizable button.
Stars: ✭ 63 (+142.31%)
Mutual labels:  button, flat
Aiflatswitch
Nicely animated flat design switch alternative to UISwitch
Stars: ✭ 904 (+3376.92%)
Mutual labels:  button, flat
Flutter Neumorphic
A complete, ready to use, Neumorphic ui kit for Flutter, 🕶️ dark mode compatible
Stars: ✭ 988 (+3700%)
Mutual labels:  button, flat
obvi
A Polymer 3+ webcomponent / button for doing speech recognition
Stars: ✭ 54 (+107.69%)
Mutual labels:  button
vue-loading-button
👇 Vue button with slideout loading indicator
Stars: ✭ 39 (+50%)
Mutual labels:  button
captouch
👇 Add capacitive touch buttons to any FPGA!
Stars: ✭ 96 (+269.23%)
Mutual labels:  button
Hyena
鬣狗快速开发库(2018年6月停止维护)
Stars: ✭ 21 (-19.23%)
Mutual labels:  button
Copy-button
copy textview into anywhere
Stars: ✭ 14 (-46.15%)
Mutual labels:  button
TabView
TabView for Android ——Slide indicator/button/tab; 滑动指示器/按钮/TAB控件
Stars: ✭ 22 (-15.38%)
Mutual labels:  button
bootstrap-directional-buttons
Directional / Arrow buttons for Bootstrap
Stars: ✭ 18 (-30.77%)
Mutual labels:  button
aria-switch-control
ARIA Switch control component
Stars: ✭ 38 (+46.15%)
Mutual labels:  button
smart-webcomponents-community
Material & Bootstrap Web Components built with Smart
Stars: ✭ 30 (+15.38%)
Mutual labels:  button
flat
Project flat is the Web, Windows and macOS client of Agora Flat open source classroom.
Stars: ✭ 4,251 (+16250%)
Mutual labels:  flat
SSSwiftUISpinnerButton
SSSwiftUISpinnerButton is a collection of various spinning animations for buttons in SwiftUI.
Stars: ✭ 37 (+42.31%)
Mutual labels:  button
Night-Mode-Button
Easy to use night mode button with cool animation
Stars: ✭ 74 (+184.62%)
Mutual labels:  button
btnx-config
btnx-config is a configuration tool for btnx (Button Extension). It allows the user to send keyboard combinations or execute commands with mouse buttons. btnx-config provides mouse and button detection, and an easy way to configure btnx's behavior. See https://github.com/cdobrich/btnx/ for btnx.
Stars: ✭ 47 (+80.77%)
Mutual labels:  button
CenteredDrawableButton
Android custom button with centered drawable
Stars: ✭ 26 (+0%)
Mutual labels:  button
vue-burger-button
🍔 vue-burger-button is a functional component, which is faster than a regular component, and is pretty small (JS min+gzip is lower than 700b and CSS min+gzip is lower than 400b).
Stars: ✭ 41 (+57.69%)
Mutual labels:  button
FancyButtonProj
Juste a funcy button with progress bar
Stars: ✭ 27 (+3.85%)
Mutual labels:  button
react-native-card-button
Fully customizable Card Button via Paraboly for React Native.
Stars: ✭ 16 (-38.46%)
Mutual labels:  button

react-native-flat-button

npm version

Flat button component for react-native

react-native flat button

Installation

npm i react-native-flat-button --save

API

Prop Type Default Description
type string(required) - Type of button. Use predefined types: 'primary', 'neutral', 'warn', 'positive', 'negative', 'info' or use 'custom'
backgroundColor string '#34495e' Sets button's background color.
borderColor string '#2c3e50' Sets button's border color.
borderRadius number 8 Sets button's border radius.
shadowHeight number 4 Sets button's border shadow.
borderLeftWidth number 0.5 Sets button's border left shadow.
borderRightWidth number 0.5 Sets button's border right shadow.
activeOpacity number 0.9 Sets button's onpressing transparency. (It should be between 0 to 1)
containerStyle View.propTypes.style {justifyContent: 'center',alignItems: 'center'} Sets button's style (Same as TouchableOpacity)
contentStyle Text.propTypes.style {color: 'white',fontSize: 18,fontWeight: 'bold'} Sets button's text style (Same as Text)

Example

import React, { Component } from 'react'
import {
  Alert,
  AppRegistry,
  StyleSheet,
  Text,
  View,
} from 'react-native'

import Button from 'react-native-flat-button'

class Example extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Text style={{ fontSize: 20, fontWeight: 'bold' }}>
          Pre-Defined Buttons
        </Text>

        <Button
          type="primary"
          onPress={() => Alert.alert('Primary Button')}
          containerStyle={styles.buttonContainer}
        >
          Primary Button
        </Button>

        <Button
          type="positive"
          onPress={() => Alert.alert('Positive Button')}
          containerStyle={styles.buttonContainer}
        >
          Positive Button
        </Button>

        <Button
          type="negative"
          onPress={() => Alert.alert('Negative Button')}
          containerStyle={styles.buttonContainer}
        >
          Negative Button
        </Button>

        <Button
          type="neutral"
          onPress={() => Alert.alert('Neutral Button')}
          containerStyle={styles.buttonContainer}
        >
          Neutral Button
        </Button>

        <Button
          type="warn"
          onPress={() => Alert.alert('Warn Button')}
          containerStyle={styles.buttonContainer}
        >
          Warn Button
        </Button>

        <Button
          type="info"
          onPress={() => Alert.alert('Info Button')}
          containerStyle={styles.buttonContainer}
        >
          Info Button
        </Button>

        <Text style={{ fontSize: 20, fontWeight: 'bold' }}>
          Custom Buttons
        </Text>

        <Button
          type="custom"
          onPress={() => Alert.alert('Custom Button #1')}
          backgroundColor={"#1abc9c"}
          borderColor={"#16a085"}
          borderRadius={10}
          shadowHeight={5}
          containerStyle={styles.buttonContainer}
          contentStyle={styles.content}
        >
          Custom Button
        </Button>

        <Button
          type="custom"
          onPress={() => Alert.alert('Custom Button #2')}
          backgroundColor={"#9b59b6"}
          borderColor={"#8e44ad"}
          borderRadius={6}
          shadowHeight={8}
          activeOpacity={0.5}
          containerStyle={styles.buttonContainer}
          contentStyle={{ fontSize: 22, fontWeight: '900' }}
        >
          Custom Button
        </Button>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  buttonContainer: {
    width: 200,
    height: 50,
    marginVertical: 5
  },
  content:{
    fontSize: 22
  }
})

AppRegistry.registerComponent('Example', () => Example)
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].