Top Related Projects
Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
Cross-Platform React Native UI Toolkit
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
Quick Overview
React Native Paper is a collection of customizable and production-ready components for React Native, following Google's Material Design guidelines. It provides a consistent look and feel across Android and iOS platforms, making it easier for developers to create visually appealing and functional mobile applications.
Pros
- Comprehensive set of pre-built, customizable components
- Follows Material Design guidelines for a modern, consistent UI
- Regular updates and active community support
- Seamless integration with React Native projects
Cons
- May require additional configuration for optimal performance on iOS
- Some components might not perfectly match native platform look and feel
- Learning curve for developers new to Material Design principles
- Potential increase in app bundle size due to additional dependencies
Code Examples
- Using a Button component:
import * as React from 'react';
import { Button } from 'react-native-paper';
const MyComponent = () => (
<Button icon="camera" mode="contained" onPress={() => console.log('Pressed')}>
Press me
</Button>
);
export default MyComponent;
- Creating a custom theme:
import * as React from 'react';
import { Provider as PaperProvider, DefaultTheme } from 'react-native-paper';
const theme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
primary: 'tomato',
accent: 'yellow',
},
};
export default function Main() {
return (
<PaperProvider theme={theme}>
{/* Your app content */}
</PaperProvider>
);
}
- Using a DataTable component:
import * as React from 'react';
import { DataTable } from 'react-native-paper';
const MyComponent = () => (
<DataTable>
<DataTable.Header>
<DataTable.Title>Dessert</DataTable.Title>
<DataTable.Title numeric>Calories</DataTable.Title>
<DataTable.Title numeric>Fat</DataTable.Title>
</DataTable.Header>
<DataTable.Row>
<DataTable.Cell>Frozen yogurt</DataTable.Cell>
<DataTable.Cell numeric>159</DataTable.Cell>
<DataTable.Cell numeric>6.0</DataTable.Cell>
</DataTable.Row>
{/* Add more rows as needed */}
</DataTable>
);
export default MyComponent;
Getting Started
To start using React Native Paper in your project:
-
Install the library:
npm install react-native-paper
-
Wrap your app with the PaperProvider component:
import * as React from 'react'; import { Provider as PaperProvider } from 'react-native-paper'; import App from './src/App'; export default function Main() { return ( <PaperProvider> <App /> </PaperProvider> ); }
-
Start using components in your app:
import * as React from 'react'; import { Appbar, Button } from 'react-native-paper'; const MyScreen = () => ( <> <Appbar.Header> <Appbar.Content title="My Awesome App" /> </Appbar.Header> <Button mode="contained" onPress={() => console.log('Pressed')}> Click me </Button> </> ); export default MyScreen;
Competitor Comparisons
Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
Pros of Material-UI
- Larger ecosystem and community support
- More comprehensive component library
- Better documentation and examples
Cons of Material-UI
- Steeper learning curve due to more complex API
- Larger bundle size, which may impact performance
- Primarily designed for web applications, not mobile-first
Code Comparison
Material-UI:
import { Button, TextField } from '@mui/material';
<Button variant="contained" color="primary">
Click me
</Button>
<TextField label="Enter text" variant="outlined" />
React Native Paper:
import { Button, TextInput } from 'react-native-paper';
<Button mode="contained" onPress={() => console.log('Pressed')}>
Click me
</Button>
<TextInput label="Enter text" mode="outlined" />
Summary
Material-UI is a popular choice for web applications with a large component library and extensive documentation. It offers more customization options but may have a steeper learning curve. React Native Paper is specifically designed for React Native applications, providing a more streamlined experience for mobile development with a smaller bundle size and simpler API. The choice between the two depends on the target platform (web vs. mobile) and the specific needs of the project.
Cross-Platform React Native UI Toolkit
Pros of React Native Elements
- More comprehensive component library with a wider range of pre-built UI elements
- Highly customizable components with extensive theming options
- Strong community support and frequent updates
Cons of React Native Elements
- Larger bundle size due to the extensive component library
- Some components may require additional configuration or styling to match specific design requirements
- Less focus on Material Design principles compared to React Native Paper
Code Comparison
React Native Elements:
import { Button, Icon } from 'react-native-elements';
<Button
icon={<Icon name="arrow-right" size={15} color="white" />}
title="Button with icon"
/>
React Native Paper:
import { Button, Icon } from 'react-native-paper';
<Button
icon="arrow-right"
mode="contained"
onPress={() => console.log('Pressed')}
>
Button with icon
</Button>
Both libraries offer similar functionality for creating buttons with icons, but React Native Paper follows Material Design more closely and has a more concise API for icon integration. React Native Elements provides more flexibility in icon customization but requires slightly more verbose code.
Mobile-first, accessible components for React Native & Web to build consistent UI across Android, iOS and Web.
Pros of NativeBase
- More extensive component library with over 40 customizable components
- Better support for accessibility features out of the box
- Easier theming system with a more flexible and intuitive API
Cons of NativeBase
- Larger bundle size, which may impact app performance
- Steeper learning curve due to more complex API and customization options
- Less frequent updates and maintenance compared to React Native Paper
Code Comparison
NativeBase:
import { Box, Text, Button } from 'native-base';
const MyComponent = () => (
<Box>
<Text>Hello World</Text>
<Button>Click me</Button>
</Box>
);
React Native Paper:
import { Surface, Text, Button } from 'react-native-paper';
const MyComponent = () => (
<Surface>
<Text>Hello World</Text>
<Button mode="contained">Click me</Button>
</Surface>
);
Both libraries offer similar basic components, but NativeBase provides a more extensive set of pre-built components and styling options. React Native Paper, on the other hand, focuses on Material Design and offers a more streamlined API. The choice between the two depends on project requirements, design preferences, and performance considerations.
UI Components Library for React Native
Pros of react-native-ui-lib
- More extensive component library with a wider range of UI elements
- Highly customizable components with built-in theming support
- Better performance optimization for large lists and complex layouts
Cons of react-native-ui-lib
- Steeper learning curve due to its extensive API and customization options
- Less frequent updates and potentially slower bug fixes compared to react-native-paper
- Larger bundle size, which may impact app performance on low-end devices
Code Comparison
react-native-ui-lib:
import { View, Text, Button } from 'react-native-ui-lib';
const MyComponent = () => (
<View>
<Text text60>Hello World</Text>
<Button label="Click me" onPress={() => {}} />
</View>
);
react-native-paper:
import { View } from 'react-native';
import { Text, Button } from 'react-native-paper';
const MyComponent = () => (
<View>
<Text>Hello World</Text>
<Button onPress={() => {}}>Click me</Button>
</View>
);
Both libraries offer similar basic components, but react-native-ui-lib provides more built-in styling options and a wider range of pre-designed UI elements. react-native-paper, on the other hand, focuses on simplicity and follows Material Design guidelines more closely.
:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
Pros of React Native UI Kitten
- More extensive component library with a wider range of UI elements
- Built-in theming system for easy customization and dark mode support
- Strong TypeScript support and documentation
Cons of React Native UI Kitten
- Less frequent updates and potentially slower bug fixes
- Steeper learning curve due to its more complex theming system
- Smaller community and fewer third-party extensions
Code Comparison
React Native UI Kitten:
import { Button, Text } from '@ui-kitten/components';
<Button>
<Text>Click me!</Text>
</Button>
React Native Paper:
import { Button } from 'react-native-paper';
<Button mode="contained" onPress={() => console.log('Pressed')}>
Click me!
</Button>
Both libraries offer similar basic components, but React Native UI Kitten often requires more setup for theming and customization. React Native Paper provides a more straightforward API for common use cases, while React Native UI Kitten offers more flexibility for complex designs.
React Native Paper generally has a larger community and more frequent updates, making it a safer choice for long-term project maintenance. However, React Native UI Kitten's extensive component library and powerful theming system can be advantageous for projects requiring highly customized UI designs.
Customizable set of components for React Native applications
Pros of Shoutem UI
- More comprehensive UI toolkit with a wider range of pre-built components
- Includes theming system and customizable styles out of the box
- Offers a visual theme editor for easier customization
Cons of Shoutem UI
- Less frequent updates and maintenance compared to React Native Paper
- Steeper learning curve due to its more complex architecture
- Smaller community and fewer third-party extensions
Code Comparison
React Native Paper:
import { Button } from 'react-native-paper';
<Button mode="contained" onPress={() => console.log('Pressed')}>
Press me
</Button>
Shoutem UI:
import { Button } from '@shoutem/ui';
<Button styleName="secondary" onPress={() => console.log('Pressed')}>
<Text>Press me</Text>
</Button>
Both libraries offer similar component APIs, but Shoutem UI uses a custom styleName
prop for styling, while React Native Paper uses more standard React Native props. Shoutem UI also requires wrapping text content in a separate Text
component.
React Native Paper generally provides a more streamlined and familiar API for React Native developers, while Shoutem UI offers a more comprehensive set of pre-built components and styling options at the cost of a steeper learning curve.
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
Material design for React Native.
reactnativepaper.com
React Native Paper is the cross-platform UI kit library containing a collection of customizable and production-ready components, which by default are following and respecting the Googleâs Material Design guidelines.
Getting Started
Refer to the getting started guide for instructions.
Documentation
Check the components and their usage in our documentation.
Features
- Follows material design guidelines
- Works on both iOS and Android following platform adaptation guidelines
- Full theming support
Try it out
ð§âð» Run the example app with Expo to see it in action. The source code for the examples are under the /example folder.
ð² You can also try out components in our demo apps available in the both stores Android and iOS.
Contributing
Read the contribution guidelines before contributing.
Figma and Sketch component kits
Use official component kits provided by Material Design.
Made with â¤ï¸ at Callstack
react-native-paper
is an open source project and will always remain free to use. If you think it's cool, please star it ð. Callstack is a group of React and React Native geeks, contact us at hello@callstack.com if you need any help with these or just want to say hi!
Like the project? âï¸ Join the team who does amazing stuff for clients and drives React Native Open Source! ð¥
Contributors
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
Top Related Projects
Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
Cross-Platform React Native UI Toolkit
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
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