react-native-reusables
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseThe skill is based on React Native Reusables (docs as of 2026-02-26), generated at 2026-02-26.
React Native Reusables brings the shadcn/ui experience to React Native: copy-paste or CLI-scaffolded components, theming via CSS variables, and RN Primitives under the hood. It supports Nativewind and Uniwind, requires a root for overlays, and uses a inheritance system and an wrapper for Lucide.
PortalHostTextIcon本技能基于React Native Reusables(文档截至2026-02-26),生成于2026-02-26。
React Native Reusables将shadcn/ui的开发体验带到了React Native中:支持复制粘贴或通过CLI搭建组件、通过CSS变量实现主题定制,底层基于RN Primitives。它支持Nativewind和Uniwind,需要根节点来实现浮层,还采用了继承系统和用于Lucide的包装器。
PortalHostTextIconCore References
核心参考
| Topic | Description | Reference |
|---|---|---|
| Overview | What RNR is, differences from shadcn/ui (portals, no cascade, icons, etc.) | core-overview |
| Installation | CLI init vs manual setup, adding components, PortalHost, dependencies | core-installation |
| Customization | components.json, global.css, tailwind.config, theme.ts | core-customization |
| 主题 | 说明 | 参考链接 |
|---|---|---|
| 概述 | 什么是RNR,与shadcn/ui的区别(如浮层实现、无样式继承、图标等) | core-overview |
| 安装 | CLI初始化 vs 手动配置、添加组件、PortalHost、依赖项 | core-installation |
| 定制 | components.json、global.css、tailwind.config、theme.ts | core-customization |
Features
功能特性
Components and patterns
组件与模式
| Topic | Description | Reference |
|---|---|---|
| Components overview | Button, Input, Dialog, variants, asChild, compound components | features-components-overview |
| Text and icons | TextClassContext inheritance, Icon wrapper with Lucide | features-text-and-icons |
| Forms & controls | Label, Input, Select, Checkbox, RadioGroup, compound pattern | features-forms-controls |
| Overlays & portals | PortalHost, Dialog/Popover/SelectContent, contentInsets | features-overlays-portals |
| Registry and CLI | init, add, doctor; custom registry and registryDependencies | features-registry-cli |
| Blocks | Auth blocks, Clerk integration, adding blocks via CLI | features-blocks |
| 主题 | 说明 | 参考链接 |
|---|---|---|
| 组件概述 | Button、Input、Dialog、变体、asChild、复合组件 | features-components-overview |
| 文本与图标 | TextClassContext继承、用于Lucide的Icon包装器 | features-text-and-icons |
| 表单与控件 | Label、Input、Select、Checkbox、RadioGroup、复合模式 | features-forms-controls |
| 浮层与门户 | PortalHost、Dialog/Popover/SelectContent、contentInsets | features-overlays-portals |
| 注册中心与CLI | init、add、doctor命令;自定义注册中心与registryDependencies | features-registry-cli |
| 模块块 | 认证模块块、Clerk集成、通过CLI添加模块块 | features-blocks |
Best practices
最佳实践
| Topic | Description | Reference |
|---|---|---|
| Adding components | Prefer CLI, PortalHost placement, path aliases, cn helper, manual copy | best-practices-adding-components |
| Troubleshooting | doctor, --log-level all, PortalHost, aliases, dependencies | best-practices-troubleshooting |
| 主题 | 说明 | 参考链接 |
|---|---|---|
| 添加组件 | 优先使用CLI、PortalHost放置、路径别名、cn工具函数、手动复制 | best-practices-adding-components |
| 故障排查 | doctor命令、--log-level all参数、PortalHost、别名、依赖项 | best-practices-troubleshooting |