Sober 是参考 Google Material You 设计规范的 Web Component UI 组件库。
Sober is a Web Component UI component library that references Google's Material You design specifications.
Sober 支持所有前端框架,如 Vue、React、Svelte 等,并且专门为 Vue 框架做了适配支持模版和 JSX 的补全以及使用 v-model
等语法。
Sober supports all front-end frameworks such as Vue, React, Svelte, and more. It is specifically tailored for the Vue framework, providing support for template and JSX completion, as well as the use of syntax like v-model
.
npm install sober
import * as sober from 'sober'
<script src="https://unpkg.com/sober/dist/sober.min.js"></script>
<script>
console.log(sober)
</script>
<s-button> Hello Sober </s-button>
动态创建组件
Dynamic creation of components
const button = document.createElement('s-button')
button.textContent = 'hello'
button.type = 'outlined'
document.body.appendChild(button)
在 soberjs.com 上查看 Sober 的完整文档。
See Sober's full documentation on soberjs.com