Skip to content
/ omi Public
forked from Tencent/omi

Web Components Framework - Web组件框架

License

Notifications You must be signed in to change notification settings

GuYith/omi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文

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 'omi'

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

About

Web Components Framework - Web组件框架

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.3%
  • TypeScript 21.3%
  • CSS 3.0%
  • HTML 0.4%