# @hawk-ui/button

> hawk-ui: Basic Button Component

Latest version **4.5.3** (published 2025-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hawk-ui/button
pnpm add @hawk-ui/button
yarn add @hawk-ui/button
bun add @hawk-ui/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 | 4.5.3 |
| Published | 2025-09-25 |
| First published | 2019-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 31.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Saurabh Gaur |
| Maintainers | saurabh2112 |
| Keywords | button, react, react component, react button, hawk, hawk-ui, ui |

## Links

- npm: https://www.npmjs.com/package/@hawk-ui/button
- npm.io page: https://npm.io/package/@hawk-ui/button

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [classnames](https://npm.io/package/classnames.md) ^2.3.2
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.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

- 4.5.3 (latest) — 2025-09-25
- 4.5.2 — 2025-09-25
- 4.5.1 — 2025-07-15
- 4.5.0 — 2025-05-19
- 4.4.9 — 2025-05-19
- 4.4.8 — 2025-04-23
- 4.4.7 — 2025-02-19
- 4.4.6 — 2025-02-11
- 4.4.5 — 2025-02-11
- 4.4.4 — 2024-12-06
- 4.4.3 — 2024-12-05
- 4.4.2 — 2024-11-25
- 4.4.1 — 2024-07-18
- 4.4.0 — 2024-06-24
- 4.3.9 — 2024-06-24
- … 290 more at https://npm.io/package/@hawk-ui/button/versions

## README

## Installation


#### To install a component run
`$ npm install @hawk-ui/button --save`


#### Please import CSS styles via
```scss noeditor
@import '/path__to__node_modules/@hawk-ui/button/dist/index.min.css
```


## Usage


#### Simple Button:
[Demo](https://hawk.oncrypt.co/#!/Button/1)
```js static
import Button from '@hawk-ui/button';
```
```js
<div style={{ display: 'flex', justifyContent: 'space-around' }}>
  <Button
    type="button"
    variant="text"
    htmlAttributes={{
      id: 'button',
    }}
    onClick={() => { window.alert('Button Was Clicked'); }}
  >
    <span>Text Button</span>
  </Button>

  <Button
    type="button"
    variant="outlined"
    onClick={() => { window.alert('Button Was Clicked'); }}
  >
    <span>Outlined Button</span>
  </Button>

  <Button
    type="button"
    variant="contained"
    onClick={() => { window.alert('Button Was Clicked'); }}
  >
    <span>Contained Button</span>
  </Button>
</div>
```


#### Disabled Button:
[Demo](https://hawk.oncrypt.co/#!/Button/3)
```js static
import Button from '@hawk-ui/button';
```
```js
<div style={{ display: 'flex', justifyContent: 'space-around' }}>
  <Button
    type="button"
    variant="text"
    isDisabled
    onClick={() => { window.alert('Button Was Clicked'); }}
  >
    <span>Text Button</span>
  </Button>

  <Button
    type="button"
    variant="outlined"
    isDisabled
    onClick={() => { window.alert('Button Was Clicked'); }}
  >
    <span>Outlined Button</span>
  </Button>

  <Button
    type="button"
    variant="contained"
    isDisabled
    onClick={() => { window.alert('Button Was Clicked'); }}
  >
    <span>Contained Button</span>
  </Button>
</div>
```


#### Icon Button:
[Demo](https://hawk.oncrypt.co/#!/Button/5)
```js static
import Button from '@hawk-ui/button';
```
```js
<div style={{ display: 'flex', justifyContent: 'space-around' }}>
  <Button
    type="button"
    variant="text"
    icon="fa fa-star"
    onClick={() => { window.alert('Button Was Clicked'); }}
  >
    <span>Text Button</span>
  </Button>
  <Button
    type="button"
    variant="outlined"
    icon="fa fa-star"
    onClick={() => { window.alert('Button Was Clicked'); }}
  >
    <span>Outlined Button</span>
  </Button>
  <Button
    type="button"
    variant="contained"
    icon="fa fa-star"
    onClick={() => { window.alert('Button Was Clicked'); }}
  >
    <span>Contained Button</span>
  </Button>
</div>
```

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