# the-button

> Button of the-components

Latest version **3.0.36** (published 2019-02-01) · MIT license · 0 weekly downloads

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

## Install

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

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.0.36 |
| Published | 2019-02-01 |
| First published | 2017-04-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 8 |
| Unpacked size | 145.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | react-component, the |

## Links

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

## 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.18
- [the-check](https://npm.io/package/the-check.md) ^2.0.18
- [the-color](https://npm.io/package/the-color.md) ^2.0.3
- [the-style](https://npm.io/package/the-style.md) ^2.2.5
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.2
- [the-component-util](https://npm.io/package/the-component-util.md) ^3.0.20

## 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

- 3.0.36 (latest) — 2019-02-01
- 3.0.35 — 2019-01-28
- 3.0.34 — 2019-01-11
- 3.0.33 — 2019-01-10
- 3.0.32 — 2018-11-23
- 3.0.31 — 2018-11-23
- 3.0.30 — 2018-11-13
- 3.0.29 — 2018-11-11
- 3.0.28 — 2018-09-28
- 3.0.27 — 2018-09-15
- 3.0.26 — 2018-08-24
- 3.0.25 — 2018-08-12
- 3.0.24 — 2018-08-09
- 3.0.23 — 2018-08-09
- 3.0.22 — 2018-08-09
- … 51 more at https://npm.io/package/the-button/versions

## README

the-button
==========

<!---
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-button
[bd_travis_url]: http://travis-ci.org/the-labo/the-button
[bd_travis_shield_url]: http://img.shields.io/travis/the-labo/the-button.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/the-labo/the-button
[bd_travis_com_shield_url]: https://api.travis-ci.com/the-labo/the-button.svg?token=
[bd_license_url]: https://github.com/the-labo/the-button/blob/master/LICENSE
[bd_npm_url]: http://www.npmjs.org/package/the-button
[bd_npm_shield_url]: http://img.shields.io/npm/v/the-button.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>

Button 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-button --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-button/doc/demo/index.html#/) is hosted on GitHub Page

```javascript
'use strict'

import React from 'react'
import { TheButton, TheButtonGroup, TheButtonStyle } from 'the-button'
import { TheRouter } from 'the-router'

class ExampleComponent extends React.PureComponent {
  handleClick = (e) => {
    console.log('clicked!', e)
  }

  render () {
    const { handleClick } = this
    return (
      <div>
        <TheRouter.Hash>
          <TheButtonStyle/>
          <TheButton onClick={handleClick}>Normal Button</TheButton>
          <TheButton primary onClick={handleClick}>Primary Button</TheButton>
          <TheButton disabled onClick={handleClick}>Disabled Button</TheButton>
          <TheButton spinning onClick={handleClick}>Spinning Button</TheButton>
          <TheButton light onClick={handleClick}>Light Button</TheButton>
          <TheButton simple onClick={handleClick}>Simple Button</TheButton>
          <TheButton danger onClick={handleClick}>Danger Button</TheButton>
          <TheButton wide onClick={handleClick}>Wide Button</TheButton>
          <TheButton large onClick={handleClick}>Large Button</TheButton>
          <TheButton rounded onClick={handleClick}>Rounded Button</TheButton>
          <TheButton rounded icon='fa fa-car' onClick={handleClick}>Rounded icon Button</TheButton>
          <TheButton rounded spinning onClick={handleClick}>Rounded Spinning Button</TheButton>
          <TheButton color='#83E' onClick={handleClick}>Color Button</TheButton>
          <TheButton color='#83E' primary onClick={handleClick}>Color Primary Button</TheButton>
          <TheButton color='#FFA' primary onClick={handleClick}>Color Primary Button2</TheButton>
          <TheButton rounded floated onClick={handleClick}>Round Float Button</TheButton>
          <TheButton to='/whatever'>Nav Button</TheButton>
          <TheButton.Prev to='#'>Go Left</TheButton.Prev>
          <TheButton.Next to='#'>Go Right</TheButton.Next>
          <TheButton icon='fa fa-car' text='Icon button'/>
          <TheButton largeIcon='fa fa-car' text='Large Icon button'/>
          <hr/>


          <TheButtonGroup>
            <TheButton onClick={handleClick}>Grouped Button 01</TheButton>
            <TheButton onClick={handleClick}>Grouped Button 02</TheButton>
          </TheButtonGroup>

          <br/>

          <TheButtonGroup collapsed>
            <TheButton onClick={handleClick}>Grouped Button 03</TheButton>
            <TheButton onClick={handleClick}>Grouped Button 04</TheButton>
            <TheButton onClick={handleClick}>Grouped Button 05</TheButton>
          </TheButtonGroup>

        </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
-----------

### TheButton

Button of the-components

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `color` | string  | Color theme | `null` |
| `danger` | bool  | Danger style | `false` |
| `disabled` | bool  | Disabled state | `false` |
| `floated` | bool  | Floated style | `false` |
| `icon` | string  | Icon class | `null` |
| `large` | bool  | Large style | `false` |
| `largeIcon` | string  | Large icon class | `null` |
| `light` | bool  | Light color | `false` |
| `minInterval` | number  | Minimum interval | `300` |
| `onSubmit` | func  | Handle submit | `null` |
| `primary` | bool  | Primary style | `false` |
| `rounded` | bool  | Rounded style | `false` |
| `simple` | bool  | Simple style | `false` |
| `small` | bool  | Small style | `false` |
| `spinning` | bool  | Show spinner | `false` |
| `text` | string  | Button text | `null` |
| `wide` | bool  | Wide style | `false` |
| `role` |   |  | `'button'` |

### TheButtonGroup

Group of buttons

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `align` | enum  | Direction to align | `'center'` |
| `collapsed` | bool  |  | `false` |

### TheButtonStyle

Style for TheButton

**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-button/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-button · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
