@g9tm/lynxcontrols

中文文档
1.7.3发布于 2026/11/16MITTypeScriptES Module近 30 天下载 2335

ReactLynx controls and overlay infrastructure: provider/host, sheets, popups, toasts, fields, buttons, pickers, tab view, tab bar, edge panel, swipe rows.

原始使用文档

@g9tm/lynxcontrols

ReactLynx controls and overlay infrastructure: provider/host, sheets, popups, toasts, fields, buttons, pickers, tab view, tab bar, edge panel, swipe rows. Depends on @g9tm/lynxcontrols-foundation and per-component lynx-ui packages.

Import components and hooks from the feature subpaths, so an app pays only for the code and CSS it uses; the root entry @g9tm/lynxcontrols re-exports types only.

SubpathWhatGuide
/provider, /host, /deferred, /icon, /baseG9Provider, G9Host (layers, back, readiness), deferred content, icons and swatches, control base hooksprovider-and-host.md
/fieldsG9TextEntry, G9Editor, G9SearchEntry, G9PinEntry, G9OutlinedFieldfields.md
/button, /toggle, /display, /expanderbuttons, check box, switch, chips, progress, separators, skeletons, expanderbuttons-and-display.md
/sheet, /selectionbottom sheets (imperative and <G9Sheet>), selection and list sheetssheets.md
/pickers, /range-slider, /cascadepicker, combo box, date/time, duration, wheels, range slider, cascade panelpickers.md
/popup, /toastpopups, input popups, toasts, loaderspopups-and-toasts.md
/tabs, /tab-bar, /plus-button, /edge-panel, /swipetab view, tab bar, plus button, edge panels, swipe rowsnavigation.md

Build plugin: @g9tm/lynxcontrols/rspeedy exports pluginG9Lynx(); add it to the app's lynx.config (inline CSS variables, see docs/theming.md).

Automation ids (MAUI AutomationId): every interactive control takes id, set on its root element so automation finds it with a selector query (#id) and taps its real bounds; fields set it on the field box, chips derive ${id}_${key}, the expander header ${id}_Header. Sheets take automationId (surface, ${id}_Back, ${id}_ToolbarItem_${key}), the tab bar fabAutomationId, popup buttons use their testId (else G9Popup_Button_<index>). Ids are used verbatim: keep them to [A-Za-z0-9_-] (a selector reads . as a class; g9SafeId converts).

Every export: docs/api.md (generated from TSDoc). MAUI mapping: docs/migration/. Every family runs in the gallery (apps/gallery).

版本与发布记录

@g9tm/lynxcontrols 共发布 15 个版本,首次发布于 2026/10/07;过去 12 个月发布了 15 个版本。

版本发布日期距今
1.7.3latest2026/11/16今天
1.7.22026/11/132 天前
1.7.12026/11/133 天前
1.7.02026/11/133 天前
1.6.12026/11/123 天前
1.6.02026/11/123 天前

关于 @g9tm/lynxcontrols 的常见问题

@g9tm/lynxcontrols 是什么?

ReactLynx controls and overlay infrastructure: provider/host, sheets, popups, toasts, fields, buttons, pickers, tab view, tab bar, edge panel, swipe rows.

如何安装 @g9tm/lynxcontrols?

在项目目录运行 npm install @g9tm/lynxcontrols,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@lynx-js/react(>=0.129.1 <0.130.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@g9tm/lynxcontrols 支持 TypeScript 吗?

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

@g9tm/lynxcontrols 支持 ESM 还是 CommonJS?

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

@g9tm/lynxcontrols 可以商用吗?

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

@g9tm/lynxcontrols 的下载量有多少?

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

@g9tm/lynxcontrols 还在维护吗?

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