# react-action-bar

> Action bar for react to simplify form/data submission and updation.

Latest version **1.0.7** (published 2021-11-07) · 0 weekly downloads

## Install

```sh
npm install react-action-bar
pnpm add react-action-bar
yarn add react-action-bar
bun add react-action-bar
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2021-11-07 |
| First published | 2021-11-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 11 |
| Unpacked size | 32.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Mihir Gupta |
| Maintainers | mihir0699 |
| Keywords | react, components, action-bar, form, save, light-weight |

## Links

- npm: https://www.npmjs.com/package/react-action-bar
- Repository: https://github.com/mihir0699/react-action-bar
- Homepage: https://github.com/mihir0699/react-action-bar#readme
- Issues: https://github.com/mihir0699/react-action-bar/issues
- npm.io page: https://npm.io/package/react-action-bar

## Dependencies (11)

- [react](https://npm.io/package/react.md) ^17.0.2
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.2
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [web-vitals](https://npm.io/package/web-vitals.md) ^1.1.2
- [react-scripts](https://npm.io/package/react-scripts.md) 4.0.3
- [@emotion/react](https://npm.io/package/@emotion/react.md) ^11.5.0
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.1
- [@emotion/styled](https://npm.io/package/@emotion/styled.md) ^11.3.0
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^11.2.7
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.15.0
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^12.8.3

## 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

- 1.0.7 (latest) — 2021-11-07
- 1.0.6 — 2021-11-07
- 1.0.5 — 2021-11-07
- 1.0.4 — 2021-11-07
- 1.0.3 — 2021-11-07
- 1.0.2 — 2021-11-07
- 1.0.1 — 2021-11-07

## README

# react-action-bar

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/mihir0699/react-action-bar)&nbsp;[![Build passing](https://img.shields.io/badge/Build-Passing-brightgreen.svg?style=flat-square)](https://github.com/mihir0699/react-action-bar)&nbsp;[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=102)](https://github.com/mihir0699/react-action-bar)&nbsp;[![License](https://img.shields.io/badge/license-MIT-brightgreen)](https://github.com/mihir0699/react-action-bar)&nbsp;![Made with Love in India](https://madewithlove.org.in/badge.svg)

# Demo

![enter image description here](https://raw.githubusercontent.com/mihir0699/react-action-bar/main/src/images/React%20App%20%283%29.gif?token=ALT5AMGLGAGNLX35YVJXM2LBSDGLY)

🎉 react-action-bar allows you to simplify form submission and data updation with just a few lines of code by introducing a fixed bar on the top of the screen and letting the user perform the actions by passing props.

## Installation :

```
$ npm install react-action-bar
$ yarn add react-action-bar
```

## Features

- No need to scroll up or down to save the form or update data.
- Fully customisable.
- Very light weight (~30kb)
- Discard action button.

## Code example:

      import React from 'react';
      import ActionBar from 'react-action-bar';

      function App(){
        return (
          <div>
           <ActionBar
    		isVisible={visible}
    		primaryAction={handleSave}
    		discardAction={handleDiscard}
    		/>
          </div>
    );

}

## Props

| Prop            | Description                                                         | Type     | Required | Default         |
| :-------------- | ------------------------------------------------------------------- | -------- | -------- | --------------- |
| isVisible       | accepts a boolean to evaluate whether to show action bar            | Boolean  | true     | -               |
| primaryAction   | accepts a function to execute when primary action button is clicked | function | true     | -               |
| discardAction   | accepts a function to execute when discard action button is clicked | function | true     | -               |
| message         | message to display on the action bar                                | function | false    | Unsaved changes |
| backgroundColor | background color of the action bar                                  | string   | false    | #000            |
| primaryColor    | primary color of the action bar                                     | string   | false    | #008060         |
| primaryTitle    | title of the primary action button                                  | string   | false    | Save            |
| discardTitle    | title of the discard action button                                  | string   | false    | Discard         |

## Contribute

Show your ❤️ and support by giving a ⭐. Any suggestions are welcome!

[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)
[![forthebadge](https://forthebadge.com/images/badges/built-by-developers.svg)](https://forthebadge.com)
<a href="https://www.buymeacoffee.com/mihir0699" target="_blank">
<img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

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