# next-link-active

> A simple way to render your links in context of the current route in Next.js

Latest version **1.0.1** (published 2018-07-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install next-link-active
pnpm add next-link-active
yarn add next-link-active
bun add next-link-active
```

## 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.0.1 |
| Published | 2018-07-29 |
| First published | 2018-07-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 307.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Gwendall Esnault |
| Maintainers | gwendall |

## Links

- npm: https://www.npmjs.com/package/next-link-active
- Repository: https://github.com/gwendall/next-link-active
- Issues: https://github.com/gwendall/next-link-active/issues
- npm.io page: https://npm.io/package/next-link-active

## Recent versions

- 1.0.1 (latest) — 2018-07-29
- 1.0.0 — 2018-07-29

## README

# Next Link Active

A simple way to render your links in context of the current route in Next.js

# Installation

```shell
npm install next-link-active
```

or

```shell
yarn add next-link-active
```

# How it works

This library just exposes a replacement for `next/link` that takes a render prop as a child with an `active` property.

```javascript
import React from 'react';
import LinkActive from 'next-link-active';

export default () => (
  <LinkActive href="/some-url" passHref>
    {active => <a style={{ color: active ? 'tomato' : 'black' }}>Link</a>}
  </LinkActive>
);
```

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