# @tmnrp/react-sidebar

> React sidebar is a component that can be used to display sidebar.

Latest version **1.0.16** (published 2022-02-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tmnrp/react-sidebar
pnpm add @tmnrp/react-sidebar
yarn add @tmnrp/react-sidebar
bun add @tmnrp/react-sidebar
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.16 |
| Published | 2022-02-09 |
| First published | 2022-02-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | TMRNP |
| Maintainers | tmnrp |
| Keywords | react, component, react-component, components, ui, sidebar, aside, side bar |

## Links

- npm: https://www.npmjs.com/package/@tmnrp/react-sidebar
- Repository: https://github.com/tmnrp/react-ui
- Homepage: https://tmnrp-react-ui.vercel.app/sidebar-page
- Issues: https://github.com/tmnrp/react-ui/issues
- npm.io page: https://npm.io/package/@tmnrp/react-sidebar

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.16 (latest) — 2022-02-09
- 1.0.15 — 2022-02-08
- 1.0.14 — 2022-02-08
- 1.0.13 — 2022-02-08
- 1.0.12 — 2022-02-08
- 1.0.11 — 2022-02-08
- 1.0.10 — 2022-02-08
- 1.0.9 — 2022-02-08
- 1.0.8 — 2022-02-08
- 1.0.7 — 2022-02-07
- 1.0.6 — 2022-02-07
- 1.0.5 — 2022-02-07

## README

# @tmnrp/react-sidebar

@tmnrp/react-sidebar is a lightweight latest treanding markup to display the sidebar.

# Features

- Configurable html attributes with ease.

### Examples [link](https://tmnrp-react-ui.vercel.app/sidebar)

```sh
https://tmnrp-react-ui.vercel.app/sidebar
```

### Installation [link](https://www.npmjs.com/package/@tmnrp/react-sidebar)

```sh
$ npm i @tmnrp/react-sidebar
```

### Properties

@tmnrp/react-sidebar (ISidebar) is currently extended with the following properties.

| Properties       | type                        | Description                                                         |
| ---------------- | --------------------------- | ------------------------------------------------------------------- |
| isExpanded       | boolean                     | Default theme value to start with.                                  |
| isExpandedWidth? | string , number , undefined | Renderable children receives theme as parameter.                    |
| ...props         | HTML div props              | Common HTML div properties that needs to be applied to the sidebar. |

### Implementation

```
import { useSidebar, SidebarToggler, Sidebar } from "@tmnrp/react-sidebar";

const App = () => {
  const { isExpanded, toggle } = useSidebar();

  //
  return (
    <div className="pb-2 border-b dark:border-b-gray-800">
      <div>
        <SidebarToggler
          isExpanded={isExpanded}
          toggle={toggle}
          isExpandedIcon={<GoogleMaterialIcons iconName="menu_open" />}
          isCollapsedIcon={<GoogleMaterialIcons iconName="menu" />}
        />
      </div>
      <div>
        <Sidebar
          className="whitespace-nowrap"
          isExpanded={isExpanded}
          isExpandedWidth={`100%`}
        >
          <div>This is side bar</div>
          <div>lorem20</div>
        </Sidebar>
      </div>
    </div>
  );
};
```

### Todos

- Let me know :-)

## License

MIT Tony Martin

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