# @delacour/react-native-ui 中文文档

规范地址：https://npmcn.com/package/%40delacour/react-native-ui/

版本：0\.9\.0
npm 元数据更新时间：2026-11-10T17:26:34.920Z
中文译文更新时间：2026-11-11T21:28:47.128Z
软件包许可：MIT

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

原始 npm 页面：https://www.npmjs.com/package/%40delacour/react-native-ui
原文对照：https://npmcn.com/package/%40delacour/react-native-ui/?lang=original
项目主页：https://ui.delacour.co.nz/docs/native/getting-started
源码仓库：https://github.com/delacournz/delacour-ui

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

- 包体积（解压后）：9.1 MB，1624 个文件
- 模块格式：ES Module
- TypeScript 类型：未声明
- 运行依赖：2 个
- peer 依赖：react \>=19，uniwind ^1\.11\.0，expo-blur \>=15，expo-router \>=57，tailwindcss ^4，react-native \>=0\.88，@legendapp/list \>=3\.3，react-native-svg \>=15，react-native-skia \>=3\.9\.0，react-native-pulsar ^1\.7\.0，expo-linear-gradient \>=15，react-native-screens \>=4\.16，react-native-teleport \>=1\.2，react-native-worklets \>=0\.5，react-native-reanimated \>=4，react-native-gesture-handler \>=3\.3，@delacour/react-native-charts \>=0\.9\.0，react-native-safe-area-context \>=5，@maplibre/maplibre-react-native ^11\.5\.0，react-native-keyboard-controller \>=1\.18，@delacour/react-native-bottom-sheet \>=0\.9\.0，@central-icons-react-native/round-outlined-radius-1-stroke-1\.5 ^1\.1
- 首次发布：2026-09-21T21:47:48.795Z
- 最新版本发布：2026-11-10T17:26:34.472Z
- 近 30 天下载量：13376（2026-10-12 至 2026-11-10，npm 官方下载统计）
- 已发布版本数：160（近 12 个月 160 个）

## 中文简介

反应原生UI组件——Unindow,再动,手势处理器

## 安装

```sh
npm install @delacour/react-native-ui
```

也可以使用：`pnpm add @delacour/react-native-ui`、`yarn add @delacour/react-native-ui`、`bun add @delacour/react-native-ui`

## README

# @delacour/反应-亲-ui

一个反应原生组件库. 时髦是 [单风](https://github.com/kirillzyusko/uniwind) — 尾风 v4 反应 原生;相互作用为再动和手势;偶发性为Pulsar.

包裹 **生船 `.tsx` 没有建设步骤.** Uninwind的变换必须 运行在消费应用的地铁管道, 所以预编成的建筑会 班级名已经死亡.

## 安装

```bash
bun add @delacour/react-native-ui
```

原生模块是 **同行依赖关系**,因为两份原生模块 注册两次,运行时中断。 完整列表——本地模块通过 `expo install`,其余的通过您的软件包管理器——来自 部件自进口并保持 [安装页面](https://ui.delacour.co.nz/docs/native/getting-started/installation)。 。 。 . 六对等者是可选的,只有在您导入需要它们的子路径时才会解决:

| 端点 | 需要时间 |
| --- | --- |
| `expo-router` | `@delacour/react-native-ui/expo/navigation-theme` |
| `@legendapp/list` | `Screen.LegendList`, (中文(简体) ), `Screen.ChatList` 财务报告和审定财务报表 `BottomSheet.LegendList` |
| `react-native-screens` | 本地堆栈导航 |
| `@delacour/react-native-charts` | `Chart` |
| `@delacour/react-native-bottom-sheet` | `BottomSheet` ——它剥取的发动机 |
| `react-native-teleport` | `BottomSheet` ——引擎的出入口;本地模块,在安装后重建dev客户端 |

颗粒出口才是安全之处:从未进口过子路径的应用程序 从来没有让Metro解决它的同行.

## 设置

**1\. 样式.** 在你的应用 `global.css`数字 :

```css
@import '@delacour/react-native-ui/styles';
@source '../../../../packages/react-native-ui/src';
```

使用真实的工作空间路径, 而不是一个 `node_modules` 1 — Bun 链接工作空间 软件包和Tailwind的扫描仪无法跟随符号链接,所以类是 静静地从生产建筑中掉下来.

**2\. 供应商.** 包接应用程序的根 :

```tsx
import { DelacourProvider } from "@delacour/react-native-ui/provider";

<DelacourProvider>{children}</DelacourProvider>;
```

这是手势根 每一个 `Pressable` 安全区供应商 键盘提供者 `Screen` 读取,并保存它们的键盘状态同步 诚实 一个应用与一个 `BottomSheet` 挂载 `BottomSheetProvider` 里面,从 `@delacour/react-native-ui/bottom-sheet` - 工作表的引擎是一个可选的对等器, 所以供养者不能.

## 使用量

有一个 **没有包式枪管.** 从子路径导入 :

```tsx
import { Button } from "@delacour/react-native-ui/button";
import { Icon } from "@delacour/react-native-ui/icon";
import { IconArrowRight } from "@delacour/react-native-ui/icons/central";

// The icon inherits the button's size and its variant's colour.
<Button haptic="selection" onPress={next}>
  <Button.Label>Continue</Button.Label>
  <Icon icon={IconArrowRight} />
</Button>;
```

## 构成部分

| 构成部分 | 导入 |  |
| --- | --- | --- |
| 手风琴 | `@delacour/react-native-ui/accordion` | 选择模式、计量面板、指标 |
| 徽标 | `@delacour/react-native-ui/badge` | 备选案文、颜色、大小、删除 |
| 底盘 | `@delacour/react-native-ui/bottom-sheet` | 接合点、键盘、粘贴脚印、可滚动、步骤、可分解、可传送门户 |
| 按钮 | `@delacour/react-native-ui/button` | 变体、大小、图标、加载 |
| 复选框 | `@delacour/react-native-ui/checkbox` | 颜色、大小、不确定、组合 |
| 外地 | `@delacour/react-native-ui/field` | 形式布局、组合、状态级联 |
| 图标 | `@delacour/react-native-ui/icon` | 中央图标,带有继承大小和颜色 |
| 投入 | `@delacour/react-native-ui/input` | 变量、大小、前缀和后缀 |
| 列表组 | `@delacour/react-native-ui/list-group` | 分组行、分隔符、槽 |
| 可压缩 | `@delacour/react-native-ui/pressable` | 手势,险道, `asChild` |
| 无线电 | `@delacour/react-native-ui/radio` | 组、选择、大小、方向 |
| 屏幕 | `@delacour/react-native-ui/screen` | 导航栏、页脚、可滚动键盘 |
| 分隔符 | `@delacour/react-native-ui/separator` | 方向、套件、重量 |
| 幻灯片 | `@delacour/react-native-ui/slider` | 范围、方向、颜色、步骤 |
| 旋转器 | `@delacour/react-native-ui/spinner` | 大小、 颜色、 自定义格言 |
| 切换 | `@delacour/react-native-ui/switch` | 拖放或自带、 颜色、 大小、 结尾内容 |
| 标签 | `@delacour/react-native-ui/tabs` | 变体、大小、刷取、滚动 |
| 文本 | `@delacour/react-native-ui/text` | 类型尺度、预设、内嵌式筑巢 |
| 德拉库尔提供商 | `@delacour/react-native-ui/provider` | 应用程序的根层堆栈 |

也导出 : `hooks/*`, (中文(简体) ), `lib/*`, (中文(简体) ), `expo/navigation-theme`, (中文(简体) ), `icons/central`,以及 页:1 `styles/*` CSS条目.

## 他们

键是 CSS 下的变量 `@variant light` 编号 : `@variant dark`组件 参考语义名称 - `bg-background`, (中文(简体) ), `text-muted-foreground` - 从不生 调色板颜色或一个 `dark:` 前缀。 对于需要颜色的道具 _价值_ 相当 而非类,使用 `useThemeColor`。 。 。 .

## 文档

[`AGENTS.md`](https://npmcn.com/package/%40delacour/react-native-ui/AGENTS.md) 是参考文献——规则、模式和 每项决定背后的推理。 每个部分都有自己的来源 内 [`src/components`](https://npmcn.com/package/%40delacour/react-native-ui/src/components)。 。 。 .

## 常见问题

### @delacour/react-native-ui 是什么？

反应原生UI组件——Unindow,再动,手势处理器

### 如何安装 @delacour/react-native-ui？

在项目目录运行 npm install @delacour/react-native-ui，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：react（\>=19）、uniwind（^1\.11\.0）、tailwindcss（^4）、react-native（\>=0\.88）、react-native-svg（\>=15）、react-native-pulsar（^1\.7\.0）、expo-linear-gradient（\>=15）、react-native-worklets（\>=0\.5）、react-native-reanimated（\>=4）、react-native-gesture-handler（\>=3\.3）、react-native-safe-area-context（\>=5）、react-native-keyboard-controller（\>=1\.18）、@central-icons-react-native/round-outlined-radius-1-stroke-1\.5（^1\.1）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @delacour/react-native-ui 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/delacour\_\_react-native-ui 是否存在。

### @delacour/react-native-ui 支持 ESM 还是 CommonJS？

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

### @delacour/react-native-ui 可以商用吗？

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

### @delacour/react-native-ui 的下载量有多少？

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

### @delacour/react-native-ui 还在维护吗？

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

