React Native Elements is a cross-platform UI toolkit providing a set of pre-built, customizable components for React Native applications. It aims to simplify the development of mobile interfaces by offering a consistent design language and a wide array of commonly used UI elements like buttons, cards, forms, and more. While this `react-native-elements` package is still available, it has been formally renamed to `@rneui/themed` starting with its v4 release. The current stable version for `react-native-elements` is 3.4.3, but the active development and new features are primarily happening under the `@rneui/themed` package, which is currently at v5.0.0. Developers are strongly encouraged to migrate to `@rneui/themed` for ongoing support, new features, and bug fixes, as this original package is considered deprecated and effectively in maintenance mode. Its key differentiators include comprehensive theming capabilities and a focus on ease of use with minimal boilerplate.
npm install react-native-elementsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up `ThemeProvider` with a custom theme and use `Button`, `Avatar`, and `Card` components from `@rneui/themed` (the successor to react-native-elements). It showcases basic component usage and theming.
Migrate your project to use `@rneui/themed` package. Follow the migration guide available on the official documentation site (reactnativeelements.com/migration/migration-v3). This involves uninstalling `react-native-elements` and installing `@rneui/themed`, then updating import paths throughout your codebase.
Update your theme definition to wrap component styles within a `components` object. For example, `createTheme({ Button: { ... } })` becomes `createTheme({ components: { Button: { ... } } })`.Review the `Button` component's behavior after upgrading to v5.0.0. Test extensively, especially on Android, and refer to the v5 release notes for any specific prop changes or recommendations regarding `Pressable` integration.
Ensure that `react-native-vector-icons` and `react-native-safe-area-context` are installed and their versions meet the requirements specified in the peer dependencies of `@rneui/themed` (or `react-native-elements` for older projects). Use `npm install react-native-vector-icons react-native-safe-area-context` and verify versions.
Ensure `react-native-vector-icons` is correctly installed and linked. For React Native versions 0.60+, `react-native link` is often not required, but manual steps might be needed for some setups. Clean your build cache (`npm start -- --reset-cache`) and reinstall dependencies.
Standardize on either `react-native-elements` (for older projects) or, preferably, `@rneui/themed` (for current projects). Ensure all imports across your codebase are consistent with the chosen package. Remove the unused package from `node_modules` and `package.json`.
Ensure your application is wrapped in a `ThemeProvider` from `@rneui/themed`. If you have a custom theme, verify its structure, particularly the `components` object for defining component-specific styles, as the theme structure changed in newer `v4` releases.