# @cthacker/next-sidebar

> NextJS sidebar component, supports variable amount of links + icons!

Latest version **1.1.0** (published 2023-10-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install @cthacker/next-sidebar
pnpm add @cthacker/next-sidebar
yarn add @cthacker/next-sidebar
bun add @cthacker/next-sidebar
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2023-10-04 |
| First published | 2023-10-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 (+33 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | cthacker-udel |
| Maintainers | cthacker |
| Keywords | nextjs, sidebar, react, typescript, reactTS, nextjs-link, css |

## Links

- npm: https://www.npmjs.com/package/@cthacker/next-sidebar
- Repository: https://github.com/cthacker-udel/Next-Sidebar
- Homepage: https://github.com/cthacker-udel/Next-Sidebar#readme
- Issues: https://github.com/cthacker-udel/Next-Sidebar/issues
- npm.io page: https://npm.io/package/@cthacker/next-sidebar

## Dependencies (4)

- [next](https://npm.io/package/next.md) ^13.5.4
- [react](https://npm.io/package/react.md) ^18.2.0
- [ts-key-enum](https://npm.io/package/ts-key-enum.md) ^2.0.12
- [@types/react](https://npm.io/package/@types/react.md) ^18.2.24

## 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.1.0 (latest) — 2023-10-04
- 1.0.0 — 2023-10-04

## README

### [NextJs](https://nextjs.org/) compliant Sidebar Component.

\* Uses FontAwesome CDN link to render `<i />` icons in the sidebar links

#### Benefits:

- Compatible with NextJS 13+
- Easier-to-read code with optional props for customization
- Lots of customization options, with less of the component bloat

#### Specifications

- Language
  - Typescript
- Framework
  - React >18+
  - NextJS >13+

##### Props Descriptions

- **`includeImage`** _boolean_
  - Whether to include an image in the top sidebar, useful for company websites
- **`imageSrc`** _string_
  - The src of the image if included
- **`imageTitle`** _string_
  - The title of the image if included, text is displayed underneath the image in a slightly smaller font
- **`links`** _SideBarLink[]_
  - The associated links you want displayed in the sidebar component

###### SideBarLink (Type)

- **`content`** _ReactNode_
  - The content of the link (usually just text)
- **`iconLink`** _string_
  - The [font-awesome](https://fontawesome.com/icons) tag, used to render the respective icon next to the link text.
- **`hasAccess`** _boolean_
  - Whether the current user has access to the link, used for roles, authorization, etc
- **`href`** _string_
  - The href link appended to the anchor tag in the link
- **`onClick`** _(\_link: string) => void | Promise<void>_
  - The onClick callback that is fired when the link is clicked, with the link auto-populated into the parameter

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