Web Components for OO
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
.vscode
src
.editorconfig
.gitignore
.prettierignore
.prettierrc.json
.travis.yml
LICENSE
README.md
deploy.js
entries.json
karma.conf.js
mock.js
package-lock.json
package.json
rollup.js
test.js
tsconfig.json
tslint.json

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