# @nextpy/clickable

> React hook and component that implements native button interactions

Latest version **2.1.0** (published 2023-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nextpy/clickable
pnpm add @nextpy/clickable
yarn add @nextpy/clickable
bun add @nextpy/clickable
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2023-11-09 |
| First published | 2023-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 138.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 40654 |
| Author | Segun Adebayo |
| Maintainers | nextpy |
| Keywords | chakra ui, clickable, tabbable, button, div button |

## Links

- npm: https://www.npmjs.com/package/@nextpy/clickable
- Repository: https://github.com/chakra-ui/chakra-ui
- Homepage: https://github.com/chakra-ui/chakra-ui#readme
- Issues: https://github.com/chakra-ui/chakra-ui/issues
- npm.io page: https://npm.io/package/@nextpy/clickable

## Dependencies (2)

- [@chakra-ui/shared-utils](https://npm.io/package/@chakra-ui/shared-utils.md) npm:@nextpy/shared-utils@2.0.5
- [@chakra-ui/react-use-merge-refs](https://npm.io/package/@chakra-ui/react-use-merge-refs.md) npm:@nextpy/react-use-merge-refs@2.1.0

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@mesalvo/react-ui](https://npm.io/package/@mesalvo/react-ui.md) — 1.7K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2023-11-09

## README

# @chakra-ui/clickable

React hook that implements all the interactions of a native `button` component
with support for making it focusable even if it is disabled.

It can be used with both native button elements or other elements (like `div`).

## Installation

```jsx
import { useClickable } from "@chakra-ui/clickable"
```

## Usage

```jsx
// create a clickable primitive
const Clickable = (props) => {
  const clickable = useClickable(props)
  return <chakra.button display="inline-flex" {...clickable} />
}

// use the clickable primitive
const Example = () => (
  <Clickable
    as="div"
    onClick={(event) => {
      alert("clicked")
    }}
    _active={{ bg: "blue", color: "white" }}
    _disabled={{ opacity: 0.4, pointerEvents: "none" }}
  >
    Clickable
  </Clickable>
)
```

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