New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

clickable-box

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clickable-box

Add `onClick` to HTML elements without sacrificing accessibility.

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
871
increased by2.96%
Maintainers
1
Weekly downloads
 
Created
Source

Build status Code coverage Bundle size Bundle size

ClickableBox

Problem: It's very hard to remove all styles from HTML button elements.

It's also hard to create clickable divs that are accessible.

Solution: The ClickableBox component allows you to add onClick to HTML elements without sacrificing accessibility.

Install

You can install ClickableBox with NPM or Yarn.

npm install clickable-box --save-exact
yarn add clickable-box --exact

We encourage pinning the version number until ClickableBox reaches 1.0.0. We may ship breaking changes in 0.x.x versions.

Props

There are a few props that are built into ClickableBox:

proptypedescription
onClickfunction | requiredThe action to perform when the element is pressed
isstring, React.Element | defaults to: divThe element to render
refReact.RefProvides access to the React element

You can pass any custom prop as well since this component spreads all of the props on the rendered element.

FAQs

Package last updated on 22 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc