Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ak-button

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ak-button

ak-button webcomponent

  • 1.3.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
98
decreased by-73.22%
Maintainers
1
Weekly downloads
 
Created
Source

Button

Synopsis

A button implementation to handle user events.

Setup and install

npm install ak-button

Using the component

HTML

This package exports the ak-button skate component. Import the component in your JS resource:

bundle.js
import AkButton from 'ak-button';

Now we can use the defined tag in our HTML markup, e.g.:

index.html
<html>
<head>
  <script src="bundle.js"></script>
</head>
<body>
  <!-- ... -->
  <ak-button>testing</ak-button>
</body>

React

import AkButton from 'ak-button';
import reactify from 'skatejs-react-integration';

const ReactComponent = reactify(AkButton, {});

ReactDOM.render(<ReactComponent />, container);

Vanilla JS

It can be used as a Constructor:

import AkButton from 'ak-button';
const myButton = new AkButton();
myButton.innerHTML = 'testing' // renders <ak-button>testing</ak-button>
document.body.appendChild(myButton) // Needed to be attached to the DOM to be rendered

Or nested inside skate elements, e.g.:

import 'ak-button';
const { vdom, define } = skate;
const { element } = vdom;

const MyButton = define('my-elem', {
  render() {
    element('ak-button', () => {
      vdom.text('My Button');
    });
  }
});

document.body.appendChild(new MyButton())  // renders <ak-button>My Button</ak-button>

FAQs

Package last updated on 21 Sep 2016

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