UI Kit for building applications Preact, Htm, Robot
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
Tom a6e03f9ee1 first commit 2年前
src first commit 2年前
.gitignore first commit 2年前
README.md first commit 2年前
bundle.js first commit 2年前
example.html first commit 2年前
package.json first commit 2年前
rollup.config.js first commit 2年前
yarn.lock first commit 2年前



twilson63 UI Kit is a combination of htm, preact, and robot to create a single bundle that can be imported either from a cdn or a single file. The bundled esm module is bundle.js


<!doctype html>
<script type="module">
  import { html, preact, robot, useMachine } from './bundle.js'
  const { render } = preact
  const { createMachine, state, transition } = robot

  const machine = createMachine({
    on: state(
      transition('toggle', 'off')
    off: state(
      transition('toggle', 'on')

  function App() {
    const [current, send] = useMachine(machine)
    return html`
      <h1>Status: ${current}</h1>
      <button onClick=${e => send('toggle')}>Toggle</button>

  render(html`<${App} />`, document.body)


yarn build