Skip to content

substrate-system/htm

Repository files navigation

htm

tests types module semantic versioning Common Changelog install size gzip size license

UI components made with htm.

See a live demo

Contents

Install

npm i -S @substrate-system/htm

Example

Button

JS

import { button } from '@substrate-system/htm/button'
import '@substrate-system/htm/css/button'

Modules

This exposes ESM and common JS via package.json exports field.

ESM

import * as components from '@susbtrate-system/htm'

Common JS

require('@susbtrate-system/htm')

CSS

Import CSS

import '@susbtrate-system/htm/css'

// or modules
import '@susbtrate-system/htm/css/button'

pre-built JS

This package exposes minified JS files too. Copy them to a location that is accessible to your web server, then link to them in HTML.

copy

cp ./node_modules/@substrate-system/htm/dist/index.min.js ./public/htm.min.js

HTML

<script type="module" src="./htm.min.js"></script>

About

components + htm

Resources

License

Stars

Watchers

Forks

Packages

No packages published