Component
A flexible modern component js plugin.
Samples
Introduction
Installation
Yarn
yarn add @pluginjs/component
NPM
npm i @pluginjs/component
Getting Started
CDN:
Development:
<script src="https://unpkg.com/@pluginjs/component/dist/component.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@pluginjs/component/dist/component.css">
Production:
<script src="https://unpkg.com/@pluginjs/component/dist/component.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@pluginjs/component/dist/component.min.css">
Initialize
HTML:
<body>
<div class="element"></div>
</body>
ECMAScript Module:
import Component from "@pluginjs/component"
import "@pluginjs/component/dist/component.css"
Component.of(document.querySelector('.element'), options)
CommonJS:
require("@pluginjs/component/dist/component.css")
const Component = require("@pluginjs/component")
Component.of(document.querySelector('.element'), options)
Browser:
<link rel="stylesheet" href="https://unpkg.com/@pluginjs/component/dist/component.css">
<script src="https://unpkg.com/@pluginjs/component/dist/component.js"></script>
<script>
Pj.component('.element', options)
</script>
API
Methods
Methods are called on component instances through the component method itself.
You can also save the instances to variable for further use.
Name | Description |
---|
"getDataOptions" | Make plugin themeable |
Browser support
Tested on all major browsers.
| | | | |
---|
Latest ✓ | Latest ✓ | Latest ✓ | Latest ✓ | Latest ✓ |
License
@pluginjs/component is Licensed under the GPL-v3 license.
If you want to use @pluginjs/component project to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary.
For purchase an Commercial License, contact us purchase@thecreation.co.
Copyright
Copyright (C) 2018 Creation Studio Limited.