Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

oo-elements

Web Components for Double O

build status

Browsers support made by godban

Chrome
Chrome
Safari
Safari
last version last version

Usage

oo-elements is a set of classes that define some Custom Elements.

Use from HTML

oo-elements is serving from CDN.

e.g. Use stable script

<script async src="//elements.ooapp.co/stable/oo-elements.js"></script>
<oo-button data-iam="{Your Double O UID}"></oo-button>

e.g. Use stable mjs

<script type="module">
  import {OOButton} from 'https://elements.ooapp.co/stable/oo-elements.mjs'
  window.customElements.define('oo-button', OOButton)
</script>

<oo-button data-iam="{Your Double O UID}"></oo-button>

Tips

Use a small script that defines one Custom Element

e.g. Only <oo-button>

elements.ooapp.co/stable/oo-elements.js
                         ^^^^^^^^^^^
                         ↓
                         oo-button.js

Use an unstable but up-to-date source

e.g.

elements.ooapp.co/stable/oo-elements.js
                  ^^^^^^
                  ↓
                  unstable

Use from JavaScript

Install oo-elements from npm.

npm i -D oo-elements

Import predefined file

import 'oo-elements'

Import ES Module

import { OOButton } from 'oo-elements/dist/oo-elements.mjs'

Development

You can’t perform that action at this time.