# @monstera/ui-components-button

> Monstera Button Component

Latest version **1.3.0** (published 2022-04-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install @monstera/ui-components-button
pnpm add @monstera/ui-components-button
yarn add @monstera/ui-components-button
bun add @monstera/ui-components-button
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2022-04-30 |
| First published | 2022-04-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Maria |
| Maintainers | marialungu |

## Links

- npm: https://www.npmjs.com/package/@monstera/ui-components-button
- Repository: https://github.com/marialungu/monstera
- Homepage: https://github.com/marialungu/monstera#readme
- Issues: https://github.com/marialungu/monstera/issues
- npm.io page: https://npm.io/package/@monstera/ui-components-button

## Dependencies (1)

- [clx](https://npm.io/package/clx.md) ^1.0.0

## Recent versions

- 1.3.0 (latest) — 2022-04-30
- 1.2.0 — 2022-04-08
- 1.0.6 — 2022-04-02
- 1.1.0 — 2022-04-02

## README

# Button

Buttons can be used for actions in a app, from submitting forms to menus or applying filters

## Installation guide

```
yarn add @monstera/ui-components-button
# or
npm install @monstera/ui-components-button
```


## Usage

### Basic

```jsx
import React from "react";
import {Button} from "@monstera/ui-components";

const MyApp = () => (
    <div>
        <Button size="medium">Login</Button>
        <Button type="secondary" size="medium">Signup</Button>
    </div>
)
```

### Button with icon

```jsx
import React from "react";
import { Edit } from 'react-feather'
import {Button} from "@monstera/ui-components";

const EditIcon = () => <Edit strokeWidth={2} size={18}/>

const MyApp = () => (
    <Button label="Edit profile" Icon={EditIcon} />
)
```

## Props

| Name | Type | Default Value | Available values | Description |
| --- | --- | --- | --- | --- |
| `type` | string | `primary` | `primary` <br/> `secondary` <br/> `tertiary` | Applies styling according to styleguide |
| `label` | string | `''` | - | The label of the button |
| `size` | string | `medium` | `large` <br/> `medium`  <br/> `small` | Defines the size of the button according to styleguide |
| `disabled` | bool | `false` | `true` <br /> `false` | Disables button when value is `true`|
| `fullWidth` | bool | `false` | `true` <br /> `false` | Button takes the width of the container when value is `true` |
| `onClick` | function | `null` | - | Callback function for `click` event |
| `className` | string  | `''` | `custom` | Component can accept custom styling |
| `icon` | svg | `''` | `any svg` | SVG Icon for the button |

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