# react-native-button-group

> 'button group'

Latest version **1.0.0** (published 2018-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-button-group
pnpm add react-native-button-group
yarn add react-native-button-group
bun add react-native-button-group
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-05-27 |
| First published | 2018-05-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | jkwu |
| Maintainers | suwu150 |
| Keywords | react-native, component, react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-button-group
- Repository: https://github.com/suwu150/react-native-button-group
- Homepage: https://github.com/suwu150/react-native-button-group#readme
- Issues: https://github.com/suwu150/react-native-button-group/issues
- npm.io page: https://npm.io/package/react-native-button-group

## Recent versions

- 1.0.0 (latest) — 2018-05-27
- 0.0.1 — 2018-05-26

## README

# react-native-button-group         

Description: 
--------------------------------------    
A group of buttons that can be added to the button. This group can be used to control whether the group of buttons is fixed at the top of the page or fixed in the middle or fixed at the bottom by passing attributes. It is also possible to perform flow layout and follow the bottom of the main page..     
    
   
The final rendering
----
![The final rendering](https://github.com/suwu150/static-resource/blob/master/images/react-native-custome-buttongroup-image.gif?raw=true)


Installation:  
-------------------------------------- 
```
 npm install --save react-native-button-group
```
Example usage: 
--------------------------------------- 
1.basic     

```javascript
import ButtonGroup from 'react-native-button-group';
   ...
render() {
    return (
      <View style={{ flex: 1 }}>
        <Text style={{ marginBottom: 10 }}>{this.state.count}</Text>
        <ButtonGroup>
          <Button
            title={'top button group'}
            onPress={() => this.setState({ count: 'submit' })}
          />
        </ButtonGroup>
      </View>
    );
  }
```

Props:   
---------------------------------------

|Props|Explain|type|require|default|          
|:-------|:--------|:--------|:-------|:----------|
|position|The position of the button group, which is one of (center, top, bottom), must be isFloat=true|string|no|bottom|     
|isFLoat|If true, Position attribute will work|bool|no|false|      
|style|button group style,The style used to modify the button group style|object|no|{padding: 5,width: WINDOW_EIDTH, backgroundColor: '#fff',flexDirection: 'row',justifyContent: 'space-between'}|     

Examples from props:
```javascript
   render() {
     return (
       <View style={styles.container}>
         <Text style={{ marginBottom: 10 }}>{this.state.count}</Text>
         <ButtonGroup
           isFLoat={true}
           position={'top'}
         >
           <Button
             title={'top button group'}
             onPress={() => this.setState({ count: 'submit' })}
           />
         </ButtonGroup>
         <ButtonGroup
           isFLoat={true}
           position={'center'}
         >
           <Button
             title={'center button group'}
             onPress={() => this.setState({ count: 'submit' })}
           />
           <Button
             title={'center button group'}
             onPress={() => this.setState({ count: 'submit' })}
           />
         </ButtonGroup>
         <ButtonGroup
           isFLoat={true}
           position={'bottom'}
         >
           <Button
             title={'bottom button group'}
             onPress={() => this.setState({ count: 'submit' })}
           />
         </ButtonGroup>
       </View>
     );
   }
```

LICENSE: 
-------   
MIT

---
_Source: https://npm.io/package/react-native-button-group · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
