English | 简体中文
Ant Design Mobile RN
![Join the chat at https://gitter.im/ant-design/ant-design](https://img.shields.io/gitter/room/ant-design/ant-design.svg?style=flat-square)
A configurable Mobile UI specification and React-based implementation.
If you only care about the style you may give [Tanjun] a try.
Features
- Follow Ant Design Mobile UI specification.
- Configurable UI style for different products.
- Support web and native usages based on React Native.
- Develop in TypeScript.
Expo
HTML5 Preview: ant-design-mobile-rn/index.html
SDK 49+ |
---|
![expo/ant-design-mobile-rn](https://qr.expo.dev/eas-update?slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&groupId=1380588b-3ab3-4216-b507-a281d159be16) |
Open the camera app on your device and scan the code above,
need install expo app: https://expo.io/tools
Expo SDK history version
Expo SDK 44 | SDK 47 iOS | SDK 47 Android |
---|
![expo/ant-design-mobile-rn](https://qr.expo.dev/expo-go?owner=1uokun&slug=ant-design-mobile-rn&releaseChannel=default&host=exp.host) | ![expo/ant-design-mobile-rn](https://qr.expo.dev/eas-update?updateId=38b3a547-ab2b-4066-95ed-400f1707dcc6&appScheme=exp&host=u.expo.dev) | ![expo/ant-design-mobile-rn](https://qr.expo.dev/eas-update?updateId=05f0e308-2dd5-4cb9-9e6b-1ae31561bfee&appScheme=exp&host=u.expo.dev) |
Install & Usage
$ npm install @ant-design/react-native @ant-design/icons-react-native
Installing peer dependencies
Next, install the required peer dependencies. You need to run different commands depending on whether your project is an Expo managed project or a bare React Native project.
-
If you have an Expo managed project, install the dependencies with expo
:
npx expo install react-native-gesture-handler react-native-reanimated
-
If you have a bare React Native project, install the dependencies with npm
:
npm install react-native-gesture-handler react-native-reanimated
-
For iOS with bare React Native project, make sure you have CocoaPods installed. Then install the pods to complete the installation:
cd ios
pod install
cd ..
Link icon fonts
Add assets to your react-native.config.js
( If not exist, please create in project’s root directory )
module.exports = {
assets: ['node_modules/@ant-design/icons-react-native/fonts'],
};
Run the react-native-asset's command and linking + unlinking is automatic
npx react-native-asset
Links
Development
node >= 18
cd example
yarn
yarn expo
git clone git@github.com:ant-design/ant-design-mobile-rn.git
cd ant-design-mobile-rn
yarn
cd rn-kitchen-sink/ios && pod install
yarn ios
yarn android
Contributing
We welcome all contributions, please read our CONTRIBUTING.md first. You can submit any ideas as pull requests or as a GitHub issue. If you'd like to improve code, check out the Development Instruction and have a good time! :)