+0
Daily
+0
Weekly
+3
Monthly
13,280
stars
1,256
forks
340
watchers
630
prs
356
issues
165
releases
README
English | 简体中文
Omi - Web Components Framework
- 📶 Signal-driven reactive programming by reactive-signal
- 🧱 TDesign Web Components & OMI Playground
- 💗 100+ OMI Templates & OMI Templates Source Code
- 🐲 OMI Form & OMI Form Playground & Lucide Omi Icons
- ⚡ Tiny size, Fast performance
- 🌐 Everything you need: Web Components, JSX, Function Components, Router, Suspense, Directive, Tailwindcss...
- 💒 Harness Constructable Stylesheets to easily manage and share styles
tsx
import { render, signal, tag, Component, h } from 'omi'
const count = signal(0)
function add() {
count.value++
}
function sub() {
count.value--
}
@tag('counter-demo')
export class CounterDemo extends Component {
static css = 'span { color: red; }'
render() {
return (
<
-
{count.value}
+
)
}
}
Use this component:
tsx
import { h } from 'omi'
import './counter-demo'
render(, document.body)
// or
import { CounterDemo, Other } from './counter-demo'
// Prevent tree Shaking when importing other things
render(, document.body)
// or
document.body.appendChild(document.createElement('counter-demo'))
Install
bash
npm i omi
To quickly create an Omi + Vite + TS/JS project:
bash
$ npx omi-cli init my-app or create js project by: npx omi-cli init-js my-app
$ cd my-app
$ npm start develop
$ npm run build release
To quickly create an Omi + Router + Signal + Suspense + Tailwindcss + Vite + TS project:
bash
$ npx omi-cli init-spa my-app
$ cd my-app
$ npm start develop
$ npm run build release
Packages
- Core packages
- omi - Implementation of omi framework.
- omi-form - Powerful, simple and cross frameworks form solution.
- lucide-omi - Lucide icon collection for omi.
- omiu - Hope to create the best web components. For example, the powerful vchart and vtable
- omi-router - Create SPA of omi framework.
- omi-cli - To quickly create an Omi + Vite + TS/JS project.
- Starter kits (not published to npm)
- omi-elements - Tailwind Element Omi UI KIT.
- omi-starter-spa - A starter repo for building single page app using Omi + OmiRouter + Tailwindcss + TypeScript + Vite + Prettier.
- omi-starter-ts - A starter repo for building web app or reusable components using Omi in TypeScript base on Vite.
- omi-starter-tailwind - A starter repo for building web app or reusable components using Omi + Tailwindcss + TypeScript + Vite.
- omi-starter-js - A starter repo for building web app or reusable components using Omi in JavaScript base on Vite.
- omi-vue - Vue SFC + Vite + OMI + OMI-WeUI.
- Components
- omi-weui - WeUI Components of omi.
- omi-auto-animate - Omi version of @formkit/auto-animate.
- omi-suspense - Handling asynchronous dependencies.
- Directives
- omi-transition - Applying animations when an component is entering and leaving the DOM.
- omi-ripple - A lightweight component for adding ripple effects to user interface element