# wuibutton

> Generic button WizUI component

Latest version **0.3.1** (published 2015-07-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install wuibutton
pnpm add wuibutton
yarn add wuibutton
bun add wuibutton
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2015-07-22 |
| First published | 2015-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Wizcorp |
| Maintainers | micky2be, wizcorp |

## Links

- npm: https://www.npmjs.com/package/wuibutton
- Repository: https://github.com/wizui/wuiButton
- Homepage: http://wizui.github.io/
- Issues: https://github.com/wizui/wuiButton/issues
- npm.io page: https://npm.io/package/wuibutton

## Dependencies (3)

- [util](https://npm.io/package/util.md) 0.10.3
- [wuidom](https://npm.io/package/wuidom.md) 0.7.0
- [wuibuttonbehavior](https://npm.io/package/wuibuttonbehavior.md) 0.2.0

## Recent versions

- 0.3.1 (latest) — 2015-07-22
- 0.3.0 — 2015-07-13

## README

#WuiButton
[![Circle CI](https://circleci.com/gh/WizUI/WuiButton/tree/master.svg?style=svg)](https://circleci.com/gh/WizUI/WuiButton/tree/master)

## What it is

WuiButton is a simple button component made for [WizUI].
This component inherits from [WuiDom] and utilizes WizUI's [wuiButtonBehavior] to setup events to listen on.

It already set CSS class on some event, so only styling is necessary.
Its main CSS class name is `'WuiButton'` and already set the pointer style for mouse over effect.

## Method

The constructor receive 2 parameters:

| Parameter | Type       | Description
| --------- | ---------- | -----------
| `options` | _Object_   | Which is forwarded to the WUiDom class for extra settings.
| `action`  | _Function_ | The function to execute for a successful tap.

## How to use WuiButton

WuiButton is essentially made so all you have to do is some styling around it.
And all is needed more more customisation is to inherit from it.

When the button is actually being pressed, the 'pressed' CSS class is added.


## CSS Class

### pressed
Active when the button is actually pressed.
Set between [`tapstart`](https://github.com/Wizcorp/wui-buttonBehavior#tapstart)
and [`tapend`](https://github.com/Wizcorp/wui-buttonBehavior#tapend)


### disabled
State when the button is disabled. Which means the button cannot be tapped.
Set when the method [`disable`](https://github.com/Wizcorp/wui-buttonBehavior#disable) is called.
Unset when the method [`enable`](https://github.com/Wizcorp/wui-buttonBehavior#enable) is called.

[WuiDom]: http://github.com/WizUI/WuiDom
[wuiButtonBehavior]: https://github.com/WizUI/wuiButtonBehavior
[WizUI]: http://wizui.github.io/

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