@campminder/ds

中文文档
0.29.0发布于 2026/11/06TypeScriptESM + CJS近 30 天下载 3514

Campminder design system components, packaged. base-ui-era shadcn primitives + domain components + design tokens, for apps that prefer npm install over shadcn copy-source.

原始使用文档
文档目录6 节
  1. Install
  2. Wire up styles — one line
  3. Use
  4. What's included
  5. Versioning
  6. Maintaining (for the design system team)

@campminder/ds

The Campminder design system as an npm package — base-ui-era components + design tokens, for apps that prefer npm install over shadcn copy-source. The package is generated from the registry (npm run sync), so it never drifts from what the design system ships.

Published to the public npm registry (no auth). Requires React 19 · Next.js App Router · Tailwind v4.

Install

npm install @campminder/ds @base-ui/react

@base-ui/react is a peer (you control its version); everything else the components need is pulled in automatically.

Wire up styles — one line

/* your globals.css, after Tailwind */
@import "tailwindcss";
@import "@campminder/ds/styles.css";   /* tokens + the @source Tailwind needs */

That single import gives you the Campminder tokens (so bg-primary is brand purple) and the Tailwind scanning of the package's components. No config file.

Use

import { Button, Card, Badge, PhoneInput, CamperForm } from "@campminder/ds"

Works in Server Components — the package carries its own client boundary.

What's included

  • Primitives: avatar, badge, breadcrumb, button, card, checkbox, command, dialog, field, input, input-group, label, popover, scroll-area, select, separator, sheet, sidebar, skeleton, switch, table, tabs, textarea, tooltip
  • Domain components: phone-input, photo-upload, step-card, step-notices, session-card / session-picker, person-list, person-tabs, camper-form, package-picker, addon-picker
  • Hooks / utils: use-locale, use-mobile, session-selection helpers, cn

Not yet included: the admin shell (sidebar/search/top-nav) — deferred to a follow-up. Pull those from the copy-source registry for now.

Versioning

semver, shared with the registry's registry-versions.json. npm update @campminder/ds to take changes; nothing updates under you.

Maintaining (for the design system team)

src/ is generated from the registry by scripts/sync-from-registry.mjs (runs automatically in npm run build). Don't hand-edit src/ — edit the source components in the design system, and the package mirrors them. styles.css is likewise generated from app/globals.css.

npm run build      # sync from registry → generate tokens → bundle (ESM+CJS+dts)

版本与发布记录

@campminder/ds 共发布 40 个版本,首次发布于 2026/06/18;过去 12 个月发布了 40 个版本。

版本发布日期距今
0.29.0latest2026/11/063 天前
0.28.02026/10/2416 天前
0.27.02026/10/2416 天前
0.26.12026/10/2416 天前
0.26.02026/10/2119 天前
0.25.02026/10/091 个月前

关于 @campminder/ds 的常见问题

@campminder/ds 是什么?

Campminder design system components, packaged. base-ui-era shadcn primitives + domain components + design tokens, for apps that prefer npm install over shadcn copy-source.

如何安装 @campminder/ds?

在项目目录运行 npm install @campminder/ds,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=19)、react-dom(>=19)、@base-ui/react(>=1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@campminder/ds 支持 TypeScript 吗?

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

@campminder/ds 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@campminder/ds 可以商用吗?

@campminder/ds 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@campminder/ds 的下载量有多少?

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

@campminder/ds 还在维护吗?

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