# itsa-react-button

> Interactive button, like a normal button, but with extended behaviour

Latest version **16.0.12** (published 2025-05-05) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install itsa-react-button
pnpm add itsa-react-button
yarn add itsa-react-button
bun add itsa-react-button
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

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

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 16.0.12 |
| Published | 2025-05-05 |
| First published | 2016-02-10 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=5 |
| Dependencies | 3 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Maintainers | itsasbreuk |
| Keywords | itsasbreuk, itsa, react, react-component, itsa-react-button, react-button |

## Links

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

## Dependencies (3)

- [itsa-dom](https://npm.io/package/itsa-dom.md) ^1.2.2
- [itsa-utils](https://npm.io/package/itsa-utils.md) ^1.4.1
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.2

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

- 16.0.12 (latest) — 2025-05-05
- 16.0.11 — 2025-05-04
- 16.0.10 — 2018-08-23
- 16.0.9 — 2018-08-08
- 16.0.8 — 2018-03-09
- 16.0.7 — 2018-02-19
- 16.0.6 — 2017-11-06
- 16.0.5 — 2017-10-31
- 16.0.4 — 2017-10-29
- 16.0.3 — 2017-10-28
- 16.0.2 — 2017-06-26
- 16.0.1 — 2017-06-26
- 16.0.0 — 2017-06-22
- 15.2.35 — 2016-09-07
- 15.2.34 — 2016-09-02
- … 49 more at https://npm.io/package/itsa-react-button/versions

## README

[![Build Status](https://travis-ci.org/ItsAsbreuk/itsa-react-button.svg?branch=master)](https://travis-ci.org/ItsAsbreuk/itsa-react-button)

Interactive button, like a normal button, but with extended behaviour.

Lightweight, focussable, responses to keypresses and will act quicker than the HTMLButtonElement.
Meaning, that the onClick-event gets fired on a mouseDown or keyDown event (native HTMLButtonElement emits on mouseUp).

Also, a keyDown event simulates the button as being pressed for at least 300ms, giving the user a better user-experience.

## How to use:

```js
const ReactDOM = require("react-dom"),
      Button = require("itsa-react-button");

const handleClick = () => {
    // ...
};

const button = ReactDOM.render(
    <Button buttonText="Press me" onClick={handleClick} />,
    document.getElementById("container")
);

button.focus();

// button.press() will press the button
```

## About the css

You need the right css in order to make use of `itsa-react-button`. There are 2 options:

1. You can use the css-files inside the `css`-folder.
2. You can use: `Component = require("itsa-react-button/lib/component-styled.jsx");` and build your project with `webpack`. This is needed, because you need the right plugin to handle a requirement of the `scss`-file.


[View live example](http://projects.itsasbreuk.nl/react-components/itsa-button/component.html)

[API](http://projects.itsasbreuk.nl/react-components/itsa-button/api/)

#### If you want to express your appreciation

Feel free to donate to one of these addresses; my thanks will be great :)

* Ether: 0xE096EBC2D19eaE7dA8745AA5D71d4830Ef3DF963
* Bitcoin: 37GgB6MrvuxyqkQnGjwxcn7vkcdont1Vmg

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