JSPM

omi

7.0.0-alpha0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1514
  • Score
    100M100P100Q120573F

Package Exports

  • omi

Readme

omi

Omi - Web Components Framework

  • 📶 Signal-driven reactive programming
  • 🌐 Web Components + JSX for streamlined component-based development
  • 💒 Harness Constructable Stylesheets to easily manage and share styles
import { render, signal, tag, Component, h } from '@/index'

const count = signal(0)

function add() {
  count.value++
}

function sub() {
  count.value--
}

@tag('counter-demo')
class CounterDemo extends Component {
  static css = 'span { color: red; }'

  render() {
    return (
      <>
        <button onClick={sub}>-</button>
        <span>{count.value}</span>
        <button onClick={add}>+</button>
      </>
    )
  }
}

render(<counter-demo />, document.body)

Install

npm i omi@7.0.0-alpha0

Contributors

License

MIT © Tencent