# the-menu

> Menu of the-components

Latest version **2.0.21** (published 2018-11-19) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install the-menu
pnpm add the-menu
yarn add the-menu
bun add the-menu
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.21 |
| Published | 2018-11-19 |
| First published | 2017-04-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.6 |
| Dependencies | 8 |
| Unpacked size | 138.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | react-component, the |

## Links

- npm: https://www.npmjs.com/package/the-menu
- Repository: https://github.com/the-labo/the-menu
- Homepage: https://github.com/the-labo/the-menu#readme
- Issues: https://github.com/the-labo/the-menu/issues
- npm.io page: https://npm.io/package/the-menu

## Dependencies (8)

- [the-icon](https://npm.io/package/the-icon.md) ^4.0.10
- [the-link](https://npm.io/package/the-link.md) ^3.0.15
- [the-style](https://npm.io/package/the-style.md) ^2.2.3
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.2
- [the-window](https://npm.io/package/the-window.md) ^7.0.1
- [the-component-util](https://npm.io/package/the-component-util.md) ^3.0.20
- [react-click-outside](https://npm.io/package/react-click-outside.md) ^3.0.1

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 2.0.21 (latest) — 2018-11-19
- 2.0.20 — 2018-11-14
- 2.0.19 — 2018-08-24
- 2.0.18 — 2018-08-09
- 2.0.17 — 2018-06-18
- 2.0.16 — 2018-06-18
- 2.0.15 — 2018-06-18
- 2.0.14 — 2018-06-18
- 2.0.13 — 2018-04-10
- 2.0.12 — 2018-03-06
- 2.0.11 — 2018-02-23
- 2.0.10 — 2018-02-23
- 2.0.9 — 2018-02-20
- 2.0.8 — 2018-02-20
- 2.0.7 — 2018-02-09
- … 20 more at https://npm.io/package/the-menu/versions

## README

the-menu
==========

<!---
This file is generated by the-tmpl. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/the-labo/the-menu
[bd_travis_url]: http://travis-ci.org/the-labo/the-menu
[bd_travis_shield_url]: http://img.shields.io/travis/the-labo/the-menu.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/the-labo/the-menu
[bd_travis_com_shield_url]: https://api.travis-ci.com/the-labo/the-menu.svg?token=
[bd_license_url]: https://github.com/the-labo/the-menu/blob/master/LICENSE
[bd_npm_url]: http://www.npmjs.org/package/the-menu
[bd_npm_shield_url]: http://img.shields.io/npm/v/the-menu.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

Menu of the-components

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>



<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->

<a name="section-doc-guides-01-installation-md"></a>

Installation
-----

```bash
$ npm install the-menu --save
```


<!-- Section from "doc/guides/01.Installation.md.hbs" End -->

<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->

<a name="section-doc-guides-02-usage-md"></a>

Usage
---------

[Live Demo](https://the-labo.github.io/the-menu/doc/demo/index.html#/) is hosted on GitHub Page

```javascript
'use strict'

import React from 'react'
import { TheMenu, TheDropdownMenu, TheMenuStyle } from 'the-menu'
import { TheRouter } from 'the-router'

class ExampleComponent extends React.PureComponent {
  render () {
    const s = this
    const ExampleMenu = ({grid = false}) => (
      <TheMenu grid={grid}>
        <TheMenu.Item icon='fa fa-support' text='Help' to='/help'/>
        <TheMenu.Item icon='fa fa-info-circle' text='About' to='/about'/>
        <TheMenu.Item icon='fa fa-sign-out' text='Logout' onClick={() => console.log('logout!')}/>
        <TheMenu.Item icon='fa fa-sun-o' text='Foo'/>
        <TheMenu.Item icon='fa fa-sun-o' text='Bar'/>
        <TheMenu.Item icon='fa fa-sun-o' text='Baz'/>
      </TheMenu>
    )
    return (
      <div>
        <TheRouter.Hash>
          <TheMenuStyle/>

          <h3>Default Menu</h3>
          <div>
            <ExampleMenu/>
          </div>

          <hr/>

          <h3>Grid Menu</h3>
          <div>
            <ExampleMenu grid/>
          </div>

          <hr/>

          <h3>Drop Down</h3>

          <TheDropdownMenu label='Try me!'
          >
            <TheDropdownMenu.Item to='foo'>foo</TheDropdownMenu.Item>
            <TheDropdownMenu.Item to='bar'>bar</TheDropdownMenu.Item>
            <TheDropdownMenu.Item>baz</TheDropdownMenu.Item>
            <TheDropdownMenu.Item to='quz'>quz</TheDropdownMenu.Item>
            <TheDropdownMenu.Item>1</TheDropdownMenu.Item>
            <TheDropdownMenu.Item>2</TheDropdownMenu.Item>
            <TheDropdownMenu.Item>Long Long Long Long Long Text</TheDropdownMenu.Item>
          </TheDropdownMenu>


          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
        </TheRouter.Hash>
      </div>
    )
  }
}

export default ExampleComponent

```


<!-- Section from "doc/guides/02.Usage.md.hbs" End -->

<!-- Section from "doc/guides/03.Components.md.hbs" Start -->

<a name="section-doc-guides-03-components-md"></a>

Components
-----------

### TheDropDownMenu

Drop down menu

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `eventsToClose` | arrayOf string | Event types to close for | `['hashchange']` |
| `label` | node  | Label for toggle button | `` |
| `open` | bool  | Open  when mounted | `false` |
| `righted` | bool  | Show on righthand | `false` |
| `role` |   |  | `'menu'` |

### TheMenu

Menu of the-components

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `grid` | bool  | Grid layout | `false` |
| `role` |   |  | `'menu'` |

### TheMenuItem

Menu of the-components

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `active` | bool  | Active or not | `false` |
| `icon` | string  | Icon class name | `null` |
| `to` | string  | Link to | `null` |
| `role` |   |  | `'menuitem'` |

### TheMenuStyle

Style for TheMenu

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `options` | object  | Style options | `{}` |



<!-- Section from "doc/guides/03.Components.md.hbs" End -->


<!-- Sections Start -->


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/the-labo/the-menu/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [THE Labo][t_h_e_labo_url]

[t_h_e_labo_url]: https://github.com/the-labo

<!-- Links End -->

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