UI components made with `htm`
npm install @substrate-system/htm
UI components made with htm.
Contents
- Install
- Example
* Button
* JS
- Modules
* ESM
* Common JS
- CSS
* Import CSS
* pre-built JS
``sh`
npm i -S @substrate-system/htm
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.$3
`js
import * as components from '@susbtrate-system/htm'
`$3
`js
require('@susbtrate-system/htm')
`CSS
$3
`js
import '@susbtrate-system/htm/css'// or modules
import '@susbtrate-system/htm/css/button'
`$3
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
`sh
cp ./node_modules/@substrate-system/htm/dist/index.min.js ./public/htm.min.js
`#### HTML
`html
``