# react-minibar

> react minibar

Latest version **0.0.1** (published 2019-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-minibar
pnpm add react-minibar
yarn add react-minibar
bun add react-minibar
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2019-02-06 |
| First published | 2019-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 32 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | MG |
| Maintainers | dioklecijan |
| Keywords | minibar, tabs, navigation, titlebar, react, react-minibar, react-hooks, hooks, utils |

## Links

- npm: https://www.npmjs.com/package/react-minibar
- Repository: http://github.com/dioklecijan/react-minibar
- npm.io page: https://npm.io/package/react-minibar

## Dependencies (2)

- [react](https://npm.io/package/react.md) 16.8.0-alpha.1
- [react-dom](https://npm.io/package/react-dom.md) 16.8.0-alpha.1

## 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.1 (latest) — 2019-02-06

## README

# react-minibar

> react-minibar (https://dioklecijan.github.io/react-minibar/)

[![NPM](https://img.shields.io/npm/v/react-minibar.svg)](https://www.npmjs.com/package/react-minibar) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)


![Screenshot](./screenshot.png)

## Requirements

This lib uses react hooks which means you need `react` and `react-dom` 
version `16.8.0-alpha1`or higher.

## Install

```bash
npm install --save react-minibar
```

## Usage

Define minibar theme in app css file:

```css
:root {
  --minibar-background-color: #fff;
  --minibar-tab-color: rgba(66, 66, 66, 0.56);
  --minibar-hover-color: rgba(66, 66, 66);
  --minibar-active-color: rgba(66, 66, 66);
  --minibar-active-bottom-border: 1px solid rgba(128, 128, 128, 0.35);
}
```

Create minibar with tab and/or command parts:

```jsx
import React, { Component } from 'react'
import { Minibar, Tabs, Cmds } from 'react-minibar';

const tabs = [
  {
    label: 'This is tab 1',
    tooltip: 'Tab 1\tCtrl+1', 
  },
  { label: 'This is tab 2', custom: 'my custom prop' },
  { label: 'Switch theme' }  
];

// if font-awesome is in use:
const cmds = [
  { icon: 'fas fa-plus', tooltip: 'New command' },
  { icon: 'fas fa-trash-alt', tooltip: 'Clear output' },
  { icon: 'fas fa-chevron-up', tooltip: 'Maximize pane' },
  { tooltip: 'missing icon' },
  { icon: 'fas fa-times', tooltip: 'Close minibar' },
];

class Example extends Component {

  function onCmd(cmdProps) { console.log(cmsProps); }

  function onTabChanged(tabProps) { console.log(tabProps);}

  function render() {
      return (
        <div>
          <Minibar>
            <Tabs tabs={tabs} onTabChanged={onTabChanged} />
            <Cmds cmds={cmds} onCmd={onCmd} />
          </Minibar>
          <main className="main">
            other things
          </main>
        </div>
      );
  }
}
```

A complete example app with multiple themes is in `example` directory:

`npm run example`


## License

MIT © [dioklecijan](https://github.com/dioklecijan)

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