Appearance
主题与样式
组件通用的主题值为 light 和 dark,尺寸值为 small、default、large。
引入样式
无论全量注册还是按需导入,都需要引入组件库样式:
ts
import "@yymojo-tec/mojo-ui/style.css";主题
多数组件提供 theme 属性:
vue
<MoButton theme="light">Light</MoButton>
<MoButton theme="dark">Dark</MoButton>
<MoButton theme="dark" type="primary">Primary</MoButton>自定义颜色
部分组件支持 background-color、border-color、text-color 等颜色属性。Vue 模板中建议使用 kebab-case:
vue
<MoButton
background-color="#1d4ed8"
border-color="#1d4ed8"
text-color="#ffffff"
>
自定义按钮
</MoButton>