# @gfazioli/mantine-onboarding-tour 中文文档

规范地址：https://npmcn.com/package/%40gfazioli/mantine-onboarding-tour/

版本：4\.1\.7
npm 元数据更新时间：2026-11-09T10:49:08.177Z
中文译文更新时间：2026-11-16T07:15:40.916Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40gfazioli/mantine-onboarding-tour
原文对照：https://npmcn.com/package/%40gfazioli/mantine-onboarding-tour/?lang=original
项目主页：https://gfazioli.github.io/mantine-onboarding-tour/
源码仓库：https://github.com/gfazioli/mantine-onboarding-tour

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：667 kB，102 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：0 个
- peer 依赖：react ^18\.x \|\| ^19\.x，react-dom ^18\.x \|\| ^19\.x，@mantine/core \>=9\.0\.0，@mantine/hooks \>=9\.0\.0，@tabler/icons-react ^3\.30\.0
- 首次发布：2025-02-28T12:24:06.855Z
- 最新版本发布：2026-11-09T10:49:07.952Z
- 近 30 天下载量：22476（2026-10-17 至 2026-11-15，npm 官方下载统计）
- 已发布版本数：63（近 12 个月 35 个）

## 中文简介

Mantine 9号机上游览部分,有焦点-启示覆盖,切出亮点,分步弹出导航等复合组件,用于引导用户体验.

## 安装

```sh
npm install @gfazioli/mantine-onboarding-tour
```

也可以使用：`pnpm add @gfazioli/mantine-onboarding-tour`、`yarn add @gfazioli/mantine-onboarding-tour`、`bun add @gfazioli/mantine-onboarding-tour`

## README

# 曼汀登机旅游组件

![Mantine Onboarding Tour](https://github.com/gfazioli/mantine-onboarding-tour/blob/master/logo.jpeg)

[![NPM version](https://img.shields.io/npm/v/%40gfazioli%2Fmantine-onboarding-tour?style=for-the-badge)](https://www.npmjs.com/package/@gfazioli/mantine-onboarding-tour) [![NPM Downloads](https://img.shields.io/npm/dm/%40gfazioli%2Fmantine-onboarding-tour?style=for-the-badge)](https://www.npmjs.com/package/@gfazioli/mantine-onboarding-tour) [![NPM Downloads](https://img.shields.io/npm/dy/%40gfazioli%2Fmantine-onboarding-tour?style=for-the-badge&label=%20&color=f90)](https://www.npmjs.com/package/@gfazioli/mantine-onboarding-tour) ![NPM License](https://img.shields.io/npm/l/%40gfazioli%2Fmantine-onboarding-tour?style=for-the-badge)

* * *

  [如果此部分对您或您的团队有用,请考虑成为发起人](https://github.com/sponsors/gfazioli?o=esc)  

![mantine-onboarding-tour at a glance, refreshed daily: commits, releases, stars, issues and pull requests, a year of commit activity, the weekly rhythm, languages, latest commits and releases, contributors](https://raw.githubusercontent.com/gfazioli/gfazioli/master/glancecard/mantine-onboarding-tour.svg)  
制造的 [外观卡](https://github.com/gfazioli/glancecard) \* 每日刷新

## 概览

此组件创建于 [曼汀语Name](https://mantine.dev/) 图书馆. 这需要 **曼汀 9.x (英语)** 财务报告和审定财务报表 **反应 19**。 。 。 .

[曼汀入住图尔](https://gfazioli.github.io/mantine-onboarding-tour/) 是在曼汀上构建的 React apps 的灵活上载系统. 您声明一系列步骤( OnboardingTourStep), 其中标题、标题、内容和页脚可以是字符串、 React 节点或接收旅游控制器用于动态渲染的函数 。 每个步骤都可以通过FocusReveal道具自定义焦点并揭示行为,包括覆盖,滚动到视图,过渡,和弹出配置. 目标可以与数据-登机-tour-id相匹配,也可以使用上机-tour来包裹. 攻击目标, 控制器会曝光当前步骤状态和行动(启动,下个,预览,结束),而高级钩子则允许您互换弹出内容,执行自定义的后台,并针对复杂的布局来裁剪覆盖或滚动容器,使产品游览既可访问又可高度定制.

巡演可以从键盘上驱动(在步间移动的窄键,出走的逃逸键),每步弹出是按其标题所命名的可接收焦点的对话框,焦点返回到巡演结束时所在位置,而其id匹配无元素的步被显示为中心欢迎或收尾的对话.

> \[!注\]
> 
> → [演示文稿和文件](https://gfazioli.github.io/mantine-onboarding-tour/) → [Youtube 视频](https://www.youtube.com/playlist?list=PL85tTROKkZrWyqCcmNCdWajpx05-cTal4) → [更多曼汀组件](https://mantine-extensions.vercel.app/)
> 
> → [全页Demo](https://gfazioli.github.io/mantine-onboarding-tour/demo)

## 安装

```sh
npm install @gfazioli/mantine-onboarding-tour
```

或者说

```sh
yarn add @gfazioli/mantine-onboarding-tour
```

在应用程序根部安装导入包样式后:

```tsx
import '@gfazioli/mantine-onboarding-tour/styles.css';
```

## 使用量

```tsx
import { OnboardingTour, type OnboardingTourStep } from '@gfazioli/mantine-onboarding-tour';

function Demo() {

  const onboardingSteps: OnboardingTourStep[] = [
    {
      id: 'welcome',
      title: 'Welcome to the Onboarding Tour Component',
      content:
        'This is a demo of the Onboarding Tour component, which allows to create onboarding experiences for your users.',
    },
    {
      id: 'my-button',
      title: 'Features',
      content: 'You can select any component by using the `data-onboarding-tour-id` attribute',
    },

  ];

  return (
    <OnboardingTour tour={onboardingSteps} started={started}>
      <Title data-onboarding-tour-id="welcome" order={4}>
        A simple example of the Onboarding Tour component
      </Title>
      <Button data-onboarding-tour-id="my-button">See all testimonials</Button>
    </OnboardingTour>
  );
}
```

## 发起人

  [如果此部分对您或您的团队有用,请考虑成为发起人](https://github.com/sponsors/gfazioli?o=esc)  

你的支持帮助了我:

-   积极维护项目,及时修复错误并更新安全信息
-   添加新特性, 提高性能,并完善开发者的经验
-   扩大测试范围和文件,以更顺利地采用
-   确保长期可持续性而不依赖临时自由时间
-   优先处理最重要的社区请求和路线图项目

开放源码的繁荣,如果受益的人能够回报——即使每月的小额捐款也会产生真正的变化。 赞助有助于覆盖维护时间、基础设施和无数使项目保持健康的无形任务.

你的帮助真的很重要.

💚 [成为提案国](https://github.com/sponsors/gfazioli?o=esc) 今天,帮助我保持这一项目的可靠性,更新,并为每个人成长.

* * *

[https://github.com/user-attachments/assets/93d39052-90be-45d7-a470-67f8727bc096 互联网档案馆的存檔,存档日期2013-12-20](https://github.com/user-attachments/assets/93d39052-90be-45d7-a470-67f8727bc096)

## 常见问题

### @gfazioli/mantine-onboarding-tour 是什么？

Mantine 9号机上游览部分,有焦点-启示覆盖,切出亮点,分步弹出导航等复合组件,用于引导用户体验\.

### 如何安装 @gfazioli/mantine-onboarding-tour？

在项目目录运行 npm install @gfazioli/mantine-onboarding-tour，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：react（^18\.x \|\| ^19\.x）、react-dom（^18\.x \|\| ^19\.x）、@mantine/core（\>=9\.0\.0）、@mantine/hooks（\>=9\.0\.0）、@tabler/icons-react（^3\.30\.0）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @gfazioli/mantine-onboarding-tour 支持 TypeScript 吗？

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

### @gfazioli/mantine-onboarding-tour 支持 ESM 还是 CommonJS？

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

### @gfazioli/mantine-onboarding-tour 可以商用吗？

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

### @gfazioli/mantine-onboarding-tour 的下载量有多少？

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

### @gfazioli/mantine-onboarding-tour 还在维护吗？

最新版本 4\.1\.7 发布于 2026/11/09（6 天前）；至今共发布 63 个版本，其中过去 12 个月发布了 35 个；首次发布于 2025/02/28。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

