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

airkit2

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airkit2

Airkit2 is a collection of JavaScript and SASS components designed to make life easier for the modern frontend developer.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Airkit2

Airkit2 is a collection of JavaScript and SASS components designed to make life easier for the modern frontend developer.

Airkit2's components are written in vanilla JavaScript (no third-party deps), aiming to be lightweight and performant. Components will decoroate elements as they enter the DOM, and similarly dispose themselves when they are removed.

Installation

npm install airkit2

Getting started

import {Registry} from 'airkit2';
import {LazyImageComponent} from 'airkit2/lazyimage';


// Create a new component registry, which handles decoration of elements as
// they enter and leave the DOM.
const app = new Registry();

// Set options for a component. Each component can have its own set of
// configurable options.
const lazyimageOptions = {
  inviewClass: 'lazyimage--visible',
  loadedClass: 'lazyimage--loaded',
};

// Register the component and bind it to a specific CSS class. When an element
// enters the DOM with that class, the component will be initialized on that
// element.
app.register('lazyimage', LazyImageComponent, lazyimageOptions);

// Start the airkit2 app.
document.addEventListener('DOMContentLoaded', () => {
  app.run();
});

Development

# Install deps
npm install

# Start the dev server at localhost:3000
npm run dev

FAQs

Package last updated on 23 Jul 2021

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