@behindthemusictree/app-kit-ui

中文文档
34.0.0发布于 2026/11/07ISCTypeScriptESM + CJS构建来源已验证近 30 天下载 2548

Styled BehindTheMusicTree React components (popups, auth callback, genre tree) built on the headless @behindthemusictree/app-kit

原始使用文档
文档目录4 节
  1. Subpaths
  2. Peers
  3. Theme contract
  4. Extension points

app-kit-ui

@behindthemusictree/app-kit-ui — the styled BehindTheMusicTree components (popups, OAuth callback screen, genre tree) built on the headless @behindthemusictree/app-kit. Install it to get the BTMT look; skip it and compose your own UI on app-kit's hooks to get a different one.

Subpaths

import { BasePopup, AuthPopup, NetworkErrorPopup, TrackUploadPopup } from "@behindthemusictree/app-kit-ui/popup";
import { AuthCallbackHandler } from "@behindthemusictree/app-kit-ui/auth";
import { GenreTreeView, TrackListSidebar, TrackItem, Rating } from "@behindthemusictree/app-kit-ui/genre-tree";
import "@behindthemusictree/app-kit-ui/genre-tree/styles.css";

Peers

@behindthemusictree/app-kit (one copy only, so the Session/Player/Popup contexts are shared), @behindthemusictree/ui, @tanstack/react-query, next, react, react-dom. Tailwind must scan node_modules/@behindthemusictree/app-kit-ui/dist/**.

Theme contract

Colors come from CSS variables, defined by @behindthemusictree/brand (tokens/theme.css) or by your own stylesheet:

TokenUsed for
--color-primary, --color-primary-hoverPrimary actions
--color-textBody text
--color-neutral-100 … --color-neutral-700 (100, 200, 300, 500, 600, 700)Surfaces, borders, muted text
--color-red-500, --color-red-600, --color-red-700Errors
--color-green-500Playing state
--color-blue-500Links and highlights

Third-party brand colors (Spotify, Google) stay literal.

PlayerPanel also reads the layout tokens --layout-gutter, --layout-band-top, --layout-right-w and --layout-detail-panel-w from the same stylesheet.

GenreTreeView with placement="regions" sets --layout-left-w to 0px on the document while its info panel is hidden, so the stylesheet can widen the center column.

Extension points

  • GenreTreeView takes className on its root (no outer margin by default) and showDisplayOptions (default true) to hide the "Tree display options" group.
  • Render props (renderArtistLink, renderSummary, renderTracksToolbar, …) replace pieces of the genre detail panel.

版本与发布记录

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

版本发布日期距今
34.0.0latest2026/11/07今天
33.3.02026/11/07今天
33.2.02026/11/07今天
33.1.02026/11/071 天前
33.0.02026/11/061 天前
32.0.32026/11/062 天前

关于 @behindthemusictree/app-kit-ui 的常见问题

@behindthemusictree/app-kit-ui 是什么?

Styled BehindTheMusicTree React components (popups, auth callback, genre tree) built on the headless @behindthemusictree/app-kit

如何安装 @behindthemusictree/app-kit-ui?

在项目目录运行 npm install @behindthemusictree/app-kit-ui,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:next(>=14.0.0)、react(>=18.0.0)、react-dom(>=18.0.0)、@tanstack/react-query(>=5.0.0)、@behindthemusictree/ui(^0.18.0)、@behindthemusictree/app-kit(^34.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@behindthemusictree/app-kit-ui 支持 TypeScript 吗?

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

@behindthemusictree/app-kit-ui 支持 ESM 还是 CommonJS?

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

@behindthemusictree/app-kit-ui 可以商用吗?

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

@behindthemusictree/app-kit-ui 的下载量有多少?

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

@behindthemusictree/app-kit-ui 还在维护吗?

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