English | 简体中文
Ant Design 移动端设计规范。@ant-design/react-native 是 Ant Design 的移动规范的 React 实现,服务于蚂蚁及口碑无线业务。
HTML5 预览: ant-design-mobile-rn/index.html
| SDK 52(react-native@0.76+) |
|---|
提示:使用本地原相机扫瞄上面的二维码, 需要下载 Expo App: https://expo.io/tools
Expo SDK(47, 49, 50, 51) history version
| SDK 47 iOS | SDK 47 Android | SDK 49,50 | SDK 51 |
|---|---|---|---|
npm install @ant-design/react-native @ant-design/icons-react-native
接下来安装来自 peerDependencies 管理的依赖:
如果使用Expo来构建项目的,请使用 expo(推荐,这能安装到最合适的版本):
bash
npx expo install react-native-gesture-handler react-native-reanimated
如果使用React Native CLI原生构建项目的,请使用 npm :
bash
npm install react-native-gesture-handler react-native-reanimated
对于 iOS 的 React Native CLI裸项目,请确保已安装 CocoaPods。然后执行 pods (auto linking),
Android 不需要手动处理:
bash
cd ios
pod install
cd ..
将字体资源路径配置到根目录下的 react-native.config.js 文件中 ( 如果没有,请创建 )
module.exports = {
assets: ['node_modules/@ant-design/icons-react-native/fonts'],
};
然后执行 react-native-asset 的命令
npx react-native-asset
# go to expo example folder
cd example
# install dependencies
yarn
# start expo
yarn expo
# clone
git clone git@github.com:ant-design/ant-design-mobile-rn.git
# go to ant rn folder
cd ant-design-mobile-rn
# install dependencies
yarn
# start ios
cd rn-kitchen-sink/ios && pod install
yarn ios
# start android
yarn android
有任何建议或意见您可以进行 提问。
感谢@ant-design/react-native的所有贡献者:
$ claude mcp add ant-design-mobile-rn \
-- python -m otcore.mcp_server <graph>