Sober 是参考 Google Material You 设计规范的 Web Component UI 组件库。
Sober is a Web Component UI component library that references the Google Material You design specification.
npm install sober
import 'sober' //引入所有组件 Load All Components
import 'sober/button' //或只引入单个组件 Loading individual components
<s-button> hello </s-button>
动态创建组件
Dynamic creation of components
import { Button } from 'sober'
const button = new Button()
//或者 or
const button2 = document.createElement('s-button')
button.textContent = 'hello'
button.theme = 'outlined'
document.body.appendChild(button)
在 soberjs.com 上查看 Sober 的完整文档。
See Sober's full documentation on soberjs.com