# angular-ng-sidenav

> Angular sidenav

Latest version **1.0.4** (published 2019-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular-ng-sidenav
pnpm add angular-ng-sidenav
yarn add angular-ng-sidenav
bun add angular-ng-sidenav
```

## 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.4 |
| Published | 2019-12-17 |
| First published | 2019-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 115.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Giorgi Merabishvili |
| Maintainers | gmerabishvili |
| Keywords | angular, angular-ng-sidenav, angular sidenav, angular-sidenav, sidenav-component, ng-sidenav, ngx-sidenav, sidenav, angular sidebar, angular-sidebar, ng-sidebar, ngx-sidebar, sidebar, sidebar-component, angular-6, angular-7, angular-8 |

## Links

- npm: https://www.npmjs.com/package/angular-ng-sidenav
- Repository: https://github.com/gmerabishvili/angular-ng-sidenav
- Homepage: https://gmerabishvili.github.io/angular-ng-sidenav/
- Issues: https://github.com/gmerabishvili/angular-ng-sidenav/issues
- npm.io page: https://npm.io/package/angular-ng-sidenav

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## 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.4 (latest) — 2019-12-17
- 1.0.3 — 2019-12-14
- 1.0.2 — 2019-12-13
- 1.0.1 — 2019-12-13
- 1.0.0 — 2019-12-13

## README

# Angular Sidenav
* See [Demo](https://gmerabishvili.github.io/angular-ng-sidenav/) 


Table of contents
=================

  * [Features](#features)
  * [Getting started](#getting-started)
  * [Usage](#usage-sample)
  * [API](#api)

## Features
- [x] Simple sidenav with hidden and collapsed view.
- [x] Variable properties and event bindings.
- [x] Custom template.

## Getting started
### Step 1: Install `angular-ng-sidenav`:

#### NPM
```shell
npm i angular-ng-sidenav
```
### Step 2: Import the SidenavLibModule:
```js
import {SidenavModule} from 'angular-ng-sidenav';

@NgModule({
  declarations: [AppComponent],
  imports: [SidenavModule],
  bootstrap: [AppComponent]
})
export class AppModule {}
```
### Usage sample

```html
<ng-sidenav-container>
  <ng-sidenav
    [expanded]="isExpanded"
    [drawerState]="state"
    [drawerWidth]="'250px'"
    [drawerWidthCollapsed]="'80px'"
    [color]="'#202c2b'">
    Sidenav content
  </ng-sidenav>
  <ng-sidenav-content>
    Main content
  </ng-sidenav-content>
</ng-sidenav-container>

```
```javascript

class TestComponent {
  isExpanded = true;
  state = 'collapsed';

  toggleSidenav() {
    this.isExpanded = !this.isExpanded;
  }
}
```

## API
### Inputs
| Input  | Type | Default | Required | Description |
| ------------- | ------------- | ------------- | ------------- | ------------- |
| expanded | `boolean`  | `null` | yes | Whether drawer is open or close depend on drawer state. |
| drawerState | `string` |  `null` | yes | Drawer state (expanded, collapsed, hidden). |
| color  | `string` | `#19222a` | no |  Sidenav color  |
| drawerWidth | `string` | `250px` | no | Drawer width by default. |
| drawerWidthCollapsed  | `string` | `80px` | no |  drawer default width on collapsed view by default.  |
| *hiddenOnCollapsed  | `boolean` | `false` | no |  show/hide some elements inside sidenav when drawer state changes from or to collapsed.  |

### Author
* [Giorgi Merabishvili](https://www.linkedin.com/in/giorgi-merabishvili-3719a2121/)


## License

MIT

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