Top Related Projects
Material Design for React Native (Android & iOS)
Mobile-first, accessible components for React Native & Web to build consistent UI across Android, iOS and Web.
UI Components Library for React Native
:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
Customizable set of components for React Native applications
👾 Clean and minimalist React Native template for a quick start with TypeScript.
Quick Overview
React Native Elements is a comprehensive UI toolkit for React Native applications. It provides a set of customizable and reusable components that follow best practices in mobile design, allowing developers to quickly build beautiful and consistent user interfaces across iOS and Android platforms.
Pros
- Extensive collection of pre-built, customizable components
- Consistent design language across platforms
- Active community and regular updates
- Excellent documentation and examples
Cons
- Can increase app bundle size if not optimized
- Some components may require additional customization for specific use cases
- Learning curve for developers new to React Native
- Occasional breaking changes between major versions
Code Examples
- Using a Button component:
import { Button } from '@rneui/themed';
const MyComponent = () => (
<Button
title="Click me!"
onPress={() => console.log('Button pressed')}
buttonStyle={{ backgroundColor: 'blue' }}
/>
);
- Creating a custom Avatar:
import { Avatar } from '@rneui/themed';
const UserAvatar = ({ name, imageUrl }) => (
<Avatar
rounded
size="medium"
source={{ uri: imageUrl }}
title={name.charAt(0)}
containerStyle={{ backgroundColor: 'gray' }}
/>
);
- Implementing a Card with an image:
import { Card, Text } from '@rneui/themed';
const ProductCard = ({ title, image, description }) => (
<Card>
<Card.Image source={{ uri: image }} />
<Card.Title>{title}</Card.Title>
<Text>{description}</Text>
</Card>
);
Getting Started
To start using React Native Elements in your project:
- Install the library:
npm install @rneui/themed @rneui/base
- Import and use components in your React Native app:
import { Button, Input, Icon } from '@rneui/themed';
const App = () => (
<>
<Input placeholder="Enter your name" />
<Button title="Submit" icon={<Icon name="check" color="white" />} />
</>
);
For more advanced usage and customization, refer to the official documentation at https://reactnativeelements.com/.
Competitor Comparisons
Material Design for React Native (Android & iOS)
Pros of React Native Paper
- Follows Material Design guidelines more closely
- Offers a wider range of components, including FAB and Snackbar
- Better TypeScript support and documentation
Cons of React Native Paper
- Slightly larger bundle size
- Less customizable out of the box
- Steeper learning curve for developers unfamiliar with Material Design
Code Comparison
React Native Paper:
import { Button } from 'react-native-paper';
<Button mode="contained" onPress={() => console.log('Pressed')}>
Press me
</Button>
React Native Elements:
import { Button } from 'react-native-elements';
<Button
title="Press me"
onPress={() => console.log('Pressed')}
buttonStyle={{ backgroundColor: 'blue' }}
/>
The main differences in the code examples are:
- React Native Paper uses the
mode
prop to define button style - React Native Elements uses separate props like
buttonStyle
for customization - React Native Paper's API is more concise and follows Material Design conventions
Both libraries offer robust UI component sets for React Native, but React Native Paper adheres more strictly to Material Design principles. React Native Elements provides more flexibility in styling but may require more custom code for complex designs. The choice between them often depends on project requirements and team preferences.
Mobile-first, accessible components for React Native & Web to build consistent UI across Android, iOS and Web.
Pros of NativeBase
- More comprehensive UI component library with a wider range of pre-built components
- Better theming support with a built-in design system and customizable theme
- Stronger TypeScript support and better type definitions
Cons of NativeBase
- Steeper learning curve due to its more complex API and design system
- Larger bundle size, which may impact app performance
- Less frequent updates and potentially slower bug fixes
Code Comparison
NativeBase:
import { Box, Text, Button } from 'native-base';
const MyComponent = () => (
<Box>
<Text>Hello World</Text>
<Button>Click me</Button>
</Box>
);
React Native Elements:
import { View, Text } from 'react-native';
import { Button } from 'react-native-elements';
const MyComponent = () => (
<View>
<Text>Hello World</Text>
<Button title="Click me" />
</View>
);
Both libraries offer similar component-based approaches, but NativeBase provides a more opinionated structure with its Box
component and built-in styling system. React Native Elements, on the other hand, relies more on React Native's core components and offers a simpler API for customization.
UI Components Library for React Native
Pros of react-native-ui-lib
- More comprehensive set of components, including advanced UI elements like Wizard and Carousel
- Better TypeScript support and type definitions
- More customizable theming system with built-in presets
Cons of react-native-ui-lib
- Steeper learning curve due to more complex API and extensive customization options
- Larger bundle size, which may impact app performance
- Less frequent updates and potentially slower bug fixes
Code Comparison
react-native-elements:
import { Button } from 'react-native-elements';
<Button
title="Click me"
buttonStyle={{ backgroundColor: 'blue' }}
onPress={() => console.log('Button pressed')}
/>
react-native-ui-lib:
import { Button } from 'react-native-ui-lib';
<Button
label="Click me"
backgroundColor="blue"
onPress={() => console.log('Button pressed')}
/>
Both libraries offer similar basic functionality, but react-native-ui-lib provides more advanced customization options and a wider range of components. However, this comes at the cost of a steeper learning curve and potentially larger bundle size. The choice between the two depends on the specific needs of your project and the level of customization required.
:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
Pros of React Native UI Kitten
- Offers a more comprehensive theming system with built-in light and dark themes
- Provides a wider range of customizable UI components
- Includes Eva Design System integration for consistent and scalable design
Cons of React Native UI Kitten
- Steeper learning curve due to its more complex architecture
- Less frequent updates and potentially slower bug fixes
- Smaller community and fewer third-party extensions
Code Comparison
React Native UI Kitten:
import { Button, Text } from '@ui-kitten/components';
const MyButton = () => (
<Button appearance='filled'>
<Text>BUTTON</Text>
</Button>
);
React Native Elements:
import { Button } from 'react-native-elements';
const MyButton = () => (
<Button title="BUTTON" />
);
The code comparison shows that React Native UI Kitten requires more nested components for basic elements, while React Native Elements offers a more straightforward approach. However, this additional complexity in UI Kitten allows for greater customization and theming options.
Both libraries provide robust UI component sets for React Native development, but they cater to different needs. React Native UI Kitten is better suited for projects requiring extensive theming and customization, while React Native Elements offers a simpler, more lightweight solution for rapid development.
Customizable set of components for React Native applications
Pros of UI
- More comprehensive UI toolkit with a wider range of pre-built components
- Includes a theme engine for consistent styling across the app
- Offers a built-in navigation system
Cons of UI
- Less frequently updated compared to React Native Elements
- Steeper learning curve due to its more opinionated structure
- Smaller community and fewer third-party extensions
Code Comparison
React Native Elements:
import { Button } from 'react-native-elements';
<Button
title="Click me"
buttonStyle={{ backgroundColor: 'blue' }}
onPress={() => console.log('Button pressed')}
/>
UI:
import { Button } from '@shoutem/ui';
<Button styleName="secondary" onPress={() => console.log('Button pressed')}>
<Text>Click me</Text>
</Button>
Both libraries provide easy-to-use components, but UI offers more built-in styling options through its theme engine and styleName prop. React Native Elements, on the other hand, provides more flexibility in customizing individual components.
React Native Elements is generally more popular and actively maintained, making it a safer choice for long-term projects. However, UI offers a more complete solution out of the box, especially for developers who prefer a more opinionated framework with consistent styling and navigation.
The choice between the two depends on project requirements, team preferences, and the desired level of customization versus out-of-the-box functionality.
👾 Clean and minimalist React Native template for a quick start with TypeScript.
Pros of react-native-template-typescript
- Provides a solid TypeScript foundation for React Native projects
- Includes essential configurations and dependencies for TypeScript development
- Offers a clean, minimal starting point for custom React Native apps
Cons of react-native-template-typescript
- Lacks pre-built UI components, requiring more initial setup for common elements
- May require additional time to implement basic UI features compared to component libraries
- Limited styling options out-of-the-box, necessitating custom styling or additional libraries
Code Comparison
react-native-template-typescript:
import React from 'react';
import { View, Text } from 'react-native';
const App: React.FC = () => (
<View>
<Text>Hello, TypeScript!</Text>
</View>
);
react-native-elements:
import React from 'react';
import { View } from 'react-native';
import { Text, Button } from 'react-native-elements';
const App = () => (
<View>
<Text h1>Hello, React Native Elements!</Text>
<Button title="Click me" />
</View>
);
The react-native-template-typescript example showcases a basic TypeScript setup, while react-native-elements demonstrates pre-built UI components with less initial configuration required for styling and functionality.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Cross Platform React Native UI Toolkit
Installation
npm install @rneui/themed @rneui/base
Follow these instructions to install React Native Elements!
Packages
Package | Version | Downloads |
---|---|---|
@rneui/base | ||
@rneui/themed |
Quick Start
Start using the components or try it on Snack.
import { Button } from '@rneui/base';
const App = () => <Button title="Hello World!" />;
React Native Web support
As a cross platform UI Toolkit, you can now use RNE on the web & share your codebase between your React Native + React web apps. RNE components are rendered perfectly on browser. You can achieve this to target iOS, Android and Web by collaborating RNE and React Native for Web.
Click here for a full walkthrough using React Native Elements + React Native Web.
Expo demo app
Checkout the official React Native Elements App on Expo which uses all of the React Native Elements components.
If you are looking to contribute to the React Native Elements App, here to view the implementation & Use this command to start example app locally
yarn example:start
VS Code Extension
Install the React Native Elements VS Code Extension to speed up development.
Documentation
Contributing
Interested in contributing to this repo? Check out our Contributing Guide, Setup Guide and submit a PR for a new feature/bug fix.
A big shoutout to all our contributors! You could be here too!
First Contributors
We encourage everyone to contribute & submit PR's especially first-time
contributors. Look for the label Good First Issue
on the issues. Click
here
to see them.
If there is something you's like to see or request a new feature, please submit an issue or a pull request.
Community
-
Discord - In case you have any other question or would like to come say Hi! to the RNE community, join our Discord Server. See you on the other side! ðð
-
Twitter - Follow us on Twitter to get the latest updates.
Backers
Become a backer and show your support for React Native Elements.
Sponsors
Do you use React Native Elements in production? If so, consider supporting this project as it will allow the maintainers to dedicate more time to maintaining this project and also building new features for everyone. Also, your app or company's logo will show on GitHub and link to your website - who doesn't want a little extra exposure? Here's the info. Check our sponsors on website.
Top Related Projects
Material Design for React Native (Android & iOS)
Mobile-first, accessible components for React Native & Web to build consistent UI across Android, iOS and Web.
UI Components Library for React Native
:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
Customizable set of components for React Native applications
👾 Clean and minimalist React Native template for a quick start with TypeScript.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot