@birdycom/omniaui-vue

中文文档
0.14.3发布于 2026/11/05MITTypeScriptES Module零依赖构建来源已验证近 30 天下载 2649

OmniaUI for Vue 3: one single-file component per OmniaUI component and block, rendering the exact markup of the CSS packages.

原始使用文档

@birdycom/omniaui-vue

Vue 3 components for OmniaCSS: one single-file component (<script setup lang="ts">) per component and per block. The markup and classes are exactly those of the HTML snippets in @birdycom/omniaui and @birdycom/omniaui-blocks; the CSS packages own all styling, the SFCs have no styles.

npm install @birdycom/omniaui-vue @birdycom/omniaui @birdycom/omniaui-blocks vue
import { createApp } from 'vue'
import { OmniaVue } from '@birdycom/omniaui-vue'

createApp(App).use(OmniaVue).mount('#app') // registers every Oc* component globally
<script setup lang="ts">
import { ref } from 'vue'
import { OcButton, OcModal, OcToastContainer, useToast } from '@birdycom/omniaui-vue'
const open = ref(false)
const toast = useToast()
</script>

<template>
  <OcButton variant="outline" size="sm" @click="open = true">Open</OcButton>
  <OcModal v-model:open="open" title="Are you sure?">
    <template #footer="{ close }"><OcButton @click="close(); toast.success('Done')">OK</OcButton></template>
  </OcModal>
  <OcToastContainer />
</template>
  • Props map to modifiers: variant, size (sm / md / lg), booleans for flags. Slots map to the snippet slots.
  • v-model on input, select, switch, checkbox, segmented, tabs, tag input, OTP, color field, dropzone; v-model:open on modal, alert dialog, sheet, collapsible, wizard.
  • Dialogs use <dialog> + showModal(), menus and popovers the popover attribute, accordions <details name>.
  • Full prop reference: the Vue page in the documentation site (ui/frameworks-vue.html).

Own the code

src/ is published too. Copy src/components/OcButton.vue (plus the src/composables/* files it imports) into your project, or import from @birdycom/omniaui-vue/src/components/OcButton.vue. manifest.json lists every item as { name, kind, file, snippet }.

Development

npm run generate -w @birdycom/omniaui-vue   # rewrite src/index.ts and manifest.json from the SFC folders
npm run build -w @birdycom/omniaui-vue      # generate + vite library build + .d.ts
npm test -w @birdycom/omniaui-vue           # vitest + @vue/test-utils (jsdom)

版本与发布记录

@birdycom/omniaui-vue 共发布 16 个版本,首次发布于 2026/10/28;过去 12 个月发布了 16 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.14.3latest2026/11/053 天前
0.14.22026/11/053 天前
0.14.12026/11/044 天前
0.14.02026/11/034 天前
0.13.02026/11/035 天前
0.12.62026/11/025 天前

关于 @birdycom/omniaui-vue 的常见问题

@birdycom/omniaui-vue 是什么?

OmniaUI for Vue 3: one single-file component per OmniaUI component and block, rendering the exact markup of the CSS packages.

如何安装 @birdycom/omniaui-vue?

在项目目录运行 npm install @birdycom/omniaui-vue,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(^3.4.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@birdycom/omniaui-vue 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@birdycom/omniaui-vue 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@birdycom/omniaui-vue 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@birdycom/omniaui-vue 可以商用吗?

@birdycom/omniaui-vue 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@birdycom/omniaui-vue 的下载量有多少?

根据 npm 官方下载统计,@birdycom/omniaui-vue 在 2026/10/08 – 2026/11/06 这 30 天内被下载 2,649 次,日均约 88 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@birdycom/omniaui-vue 还在维护吗?

最新版本 0.14.3 发布于 2026/11/05(3 天前);至今共发布 16 个版本,其中过去 12 个月发布了 16 个;首次发布于 2026/10/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。