# @lucasmrc435/rn-fab

> Floating Action Button(FAB) for React Native

Latest version **0.0.2** (published 2020-05-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @lucasmrc435/rn-fab
pnpm add @lucasmrc435/rn-fab
yarn add @lucasmrc435/rn-fab
bun add @lucasmrc435/rn-fab
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2020-05-28 |
| First published | 2020-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 55.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Lucas Maia |
| Maintainers | lucasmrc435 |
| Keywords | react, native, fab, floating, action, button, floating-action, float-button, action-button, multi-action-button, floating-action-button, float-action-button, react-native, react-native-floating-button, react-native-floating-action-button, react-native-fab |

## Links

- npm: https://www.npmjs.com/package/@lucasmrc435/rn-fab
- Repository: https://github.com/Lucasmaia435/RN-Floating-Action-Button
- Issues: https://github.com/Lucasmaia435/RN-Floating-Action-Button/issues
- npm.io page: https://npm.io/package/@lucasmrc435/rn-fab

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2020-05-28
- 0.0.1 — 2020-05-28

## README

# @lucasmrc435/rn-fab

React Native _**Floating Action Button**_

![Floating Action Button](./assets/FAB_img.jpeg)
# Install

Using npm 

```
npm install @lucasmrc435/rn-fab --save
```

Using yarn

```
yarn add @lucasmrc435/rn-fab
``` 

# Import 

```javascript
import FloatingActionButton from '@lucasmrc435/rn-fab'
```

# Usage

```javascript
    <FloatingActionButton 
    color="orange" 
    onPress={() => {
        console.log("FAB Pressed!");
    }}
    />
```

# Example
```javascript
import React from 'react';
import { View, Text } from 'react-native';

import FloatingActionButton from '@lucasmrc435/rn-fab'

const App = () => {
    return (
        <View> 
              <Text>Look at the FAB</Text>

              <FloatingActionButton 
                color="orange" 
                onPress={() => {
                    console.log("FAB Pressed!");
                }}
                />

                <FloatingActionButton 
                position="center"
                onPress={() => {
                    console.log("FAB Pressed!");
                }}
                />
                
                <FloatingActionButton 
                position="left"
                icon="wallet" 
                onPress={() => {
                    console.log("FAB Pressed!");
                }}
                />
        <View>
    );
}
```


![Floating Action Button](./assets/FAB_example.jpeg)

# Props

| Property | Type | Default | Description|
|----------|------|---------|------------|
| color    | String  | #049bdb | FAB's Color|
| position | String  | ```right```  | FAB's position|
| icon     | String  | ```plus``` | FAB's Icon|
| iconColor| String  | white | Icon's Color|
| OnPress    | Function  | null | FAB's onPress function|


## ```color``` 
The color that will fill the FAB. Any color of StyleSheets and CSS

type : ```String```

## ```position```
The FAB's position. Position can only be ```left``` | ```center``` | ```right```

type : ```String```


## ```icon```
The Icon that will appear inside the FAB. Any Icon from [MaterialCommunityIcons](https://materialdesignicons.com/)

type : ```String```

## ```iconColor```
The color that will fill the FAB's Icon

type : ```String```

## ```onPress```
The function that is called when the button is activated.

type : ```Void Function```

---
_Source: https://npm.io/package/@lucasmrc435/rn-fab · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
