# @gfazioli/mantine-depth-select 中文文档

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

版本：2\.1\.1
npm 元数据更新时间：2026-11-09T11:11:24.053Z
中文译文更新时间：2026-11-16T07:18:34.213Z
软件包许可：MIT

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

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

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

- 包体积（解压后）：199 kB，32 个文件
- 模块格式：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
- 首次发布：2026-03-28T06:47:33.256Z
- 最新版本发布：2026-11-09T11:11:23.905Z
- 近 30 天下载量：6162（2026-10-17 至 2026-11-15，npm 官方下载统计）
- 已发布版本数：23（近 12 个月 23 个）

## 中文简介

一个由macOS Time Machine所启发的3D堆栈选择组件,用于与Mantine所构建的回放应用程序. 导航通过有视角转换和平稳过渡的叠加卡.

## 安装

```sh
npm install @gfazioli/mantine-depth-select
```

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

## README

# 曼汀深度选择组件

![Mantine Depth Select](https://github.com/gfazioli/mantine-depth-select/blob/master/logo.jpeg)

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

* * *

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

![mantine-depth-select 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-depth-select.svg)  
制造的 [外观卡](https://github.com/gfazioli/glancecard) \* 每日刷新

## 概览

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

这个 [曼汀深度选择](https://gfazioli.github.io/mantine-depth-select/) 组件是一个由 MacOS 时间机器所启发的3D 堆栈选择,用于与 Maintine 构建的反演应用程序。 导航通过有视角转换和平稳过渡的叠加卡.

## 特征

-   🃏 **三维堆叠效果**: 带有视角转换的卡片堆叠 (比例, 翻译Y, 不透明, 模糊)
-   🎛️ **受控无控( U)**: 完全控制通过 `value`编号 :`onChange` 或自动国家管理
-   ⌨️ **键盘导航**: 向上/向下箭头, 主/向后键支持
-   🖱️ **滚动导航**: 鼠标轮和跟踪盘手势支持
-   📱 **触摸支持**:移动设备的刷卡手势
-   🔄 **循环模式**: 无穷导航, 堆栈从最后一个项折回第一个项
-   🎮 **内置控制器**: 自定义带有定位(右/左)的箭头控件
-   🧩 **复合组件**: 使用 `DepthSelect.Controls` 作为儿童完全定制
-   ♿ **无障碍**: WAI-ARIA 列表框模式,带有适当的角色和标签
-   🎨 **样式 API**: 广泛定制 `classNames` 道具
-   📦 **类型脚本**: 框外的完整类型安全

> \[!注\]
> 
> → [演示文稿和文件](https://gfazioli.github.io/mantine-depth-select/) → [更多曼汀组件](https://mantine-extensions.vercel.app/)

## 安装

```sh
npm install @gfazioli/mantine-depth-select
```

或者说

```sh
yarn add @gfazioli/mantine-depth-select
```

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

```tsx
import '@gfazioli/mantine-depth-select/styles.css';
```

## 使用量

```tsx
import { Card, Text } from '@mantine/core';
import { DepthSelect, DepthSelectItem } from '@gfazioli/mantine-depth-select';

const data: DepthSelectItem[] = [
  { value: 'item-1', view: <Card p="lg" withBorder h="100%"><Text>Item 1</Text></Card> },
  { value: 'item-2', view: <Card p="lg" withBorder h="100%"><Text>Item 2</Text></Card> },
  { value: 'item-3', view: <Card p="lg" withBorder h="100%"><Text>Item 3</Text></Card> },
];

function Demo() {
  return <DepthSelect data={data} w={400} h={200} />;
}
```

## 发起人

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

你的支持帮助了我:

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

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

你的帮助真的很重要.

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

## 常见问题

### @gfazioli/mantine-depth-select 是什么？

一个由macOS Time Machine所启发的3D堆栈选择组件,用于与Mantine所构建的回放应用程序\. 导航通过有视角转换和平稳过渡的叠加卡\.

### 如何安装 @gfazioli/mantine-depth-select？

在项目目录运行 npm install @gfazioli/mantine-depth-select，或使用 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）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @gfazioli/mantine-depth-select 支持 TypeScript 吗？

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

### @gfazioli/mantine-depth-select 支持 ESM 还是 CommonJS？

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

### @gfazioli/mantine-depth-select 可以商用吗？

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

### @gfazioli/mantine-depth-select 的下载量有多少？

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

### @gfazioli/mantine-depth-select 还在维护吗？

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

