@fiscozen/navbar

中文文档
0.4.4发布于 2026/10/23ISCES Module近 30 天下载 2288

Design System Navbar Component

原始使用文档

@fiscozen/navbar

RFC: https://github.com/fiscozen/knowledge-base/pull/91

Navbar skeleton component meant for primary navigation.

Elevation (elevation)

FzNavbar casts an elevation shadow by default. Pass elevation="flat" for a navbar that sits on the page background rather than above it — the backoffice rail inside FzFrameTemplate is the case it exists for: with nothing behind the rail, a shadow draws a fake edge along a seamless surface.

<FzNavbar variant="vertical" elevation="flat" />
Value
raised (default)the elevation shadow — unchanged from every version before the prop existed
flatno shadow

Why a prop and not a class at the call site. The shadow is declared by this package's own .fz-navbar rule, which sits at the same specificity as a Tailwind utility — so whether a shadow-none added at the call site wins comes down to stylesheet order, not intent. The --fz-navbar-shadow custom property is not an answer either: setting it needs style, which consuming repos block under their compose-only styling policy exactly as they block class. Deciding it inside the component is the only way the capability exists for them at all. elevation also takes precedence over --fz-navbar-shadow, deliberately — an explicit API should beat a property set further up.

The other layout values (--fz-navbar-padding, --fz-navbar-height, --fz-navbar-bg, …) are still custom properties, with the same caveat: they are out of reach for a compose-only consumer. Promote one to a prop when a consumer actually needs it.

版本与发布记录

@fiscozen/navbar 共发布 27 个版本,首次发布于 2024/05/08;过去 12 个月发布了 22 个版本。

版本发布日期距今
0.4.4latest2026/10/2323 天前
0.4.32026/10/2026 天前
0.4.22026/09/291 个月前
0.4.12026/09/142 个月前
0.4.02026/09/072 个月前
0.3.72026/08/043 个月前

关于 @fiscozen/navbar 的常见问题

@fiscozen/navbar 是什么?

Design System Navbar Component

如何安装 @fiscozen/navbar?

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

@fiscozen/navbar 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/fiscozen__navbar 是否存在。

@fiscozen/navbar 支持 ESM 还是 CommonJS?

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

@fiscozen/navbar 可以商用吗?

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

@fiscozen/navbar 的下载量有多少?

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

@fiscozen/navbar 还在维护吗?

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