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
Cross-Platform React Native UI Toolkit
A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
Quick Overview
Shoutem UI is a React Native UI toolkit that provides a set of customizable components for building mobile applications. It offers a comprehensive collection of pre-built UI elements, themes, and animations to help developers create visually appealing and consistent user interfaces quickly and efficiently.
Pros
- Extensive library of pre-built, customizable components
- Consistent design language across all components
- Easy integration with existing React Native projects
- Built-in theming system for easy customization
Cons
- Learning curve for developers new to the Shoutem ecosystem
- Some components may have limited flexibility for highly custom designs
- Documentation could be more comprehensive and up-to-date
- Potential performance overhead for complex layouts
Code Examples
- Creating a simple screen with a header and text:
import React from 'react';
import { Screen, NavigationBar, Text } from '@shoutem/ui';
const SimpleScreen = () => (
<Screen>
<NavigationBar title="Simple Screen" />
<Text>Hello, Shoutem UI!</Text>
</Screen>
);
export default SimpleScreen;
- Using a ListView component with custom styling:
import React from 'react';
import { ListView, Text, View, StyleSheet } from '@shoutem/ui';
const data = [
{ id: 1, name: 'Item 1' },
{ id: 2, name: 'Item 2' },
{ id: 3, name: 'Item 3' },
];
const CustomListView = () => (
<ListView
data={data}
renderRow={(item) => (
<View styleName="horizontal v-center">
<Text>{item.name}</Text>
</View>
)}
/>
);
export default CustomListView;
- Implementing a button with an icon:
import React from 'react';
import { Button, Icon, Text } from '@shoutem/ui';
const IconButton = () => (
<Button styleName="secondary">
<Icon name="add-to-favorites" />
<Text>Add to Favorites</Text>
</Button>
);
export default IconButton;
Getting Started
To start using Shoutem UI in your React Native project:
- Install the package:
npm install @shoutem/ui
- Import and use components in your React Native app:
import React from 'react';
import { Screen, Button, Text } from '@shoutem/ui';
const App = () => (
<Screen>
<Button styleName="secondary">
<Text>Hello, Shoutem UI!</Text>
</Button>
</Screen>
);
export default App;
Make sure to wrap your app with the StyleProvider
component to enable theming:
import React from 'react';
import { StyleProvider } from '@shoutem/theme';
import { Screen, Button, Text } from '@shoutem/ui';
const App = () => (
<StyleProvider>
<Screen>
<Button styleName="secondary">
<Text>Hello, Shoutem UI!</Text>
</Button>
</Screen>
</StyleProvider>
);
export default App;
Competitor Comparisons
Material Design for React Native (Android & iOS)
Pros of react-native-paper
- More comprehensive component library with a wider range of UI elements
- Better documentation and examples, making it easier for developers to implement
- Regular updates and active maintenance from the Callstack team
Cons of react-native-paper
- Larger bundle size due to the extensive component library
- Less customizable out-of-the-box compared to Shoutem UI
- Steeper learning curve for developers new to Material Design principles
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 onPress={() => console.log('Pressed')}>
<Text>Press me</Text>
</Button>
Summary
react-native-paper offers a more extensive component library with better documentation, making it suitable for larger projects that require a wide range of UI elements. However, it comes with a larger bundle size and may be less flexible for custom designs. Shoutem UI, on the other hand, provides a more lightweight solution with greater customization options but may require more effort to implement complex UI components.
Mobile-first, accessible components for React Native & Web to build consistent UI across Android, iOS and Web.
Pros of NativeBase
- Larger community and more frequent updates
- Extensive theming capabilities with customizable design tokens
- Better TypeScript support and type definitions
Cons of NativeBase
- Steeper learning curve due to more complex API
- Larger bundle size, which may impact app performance
- Some components may require additional configuration
Code Comparison
NativeBase:
import { Box, Text, VStack } from 'native-base';
const Example = () => (
<Box>
<VStack space={4}>
<Text>Hello World</Text>
</VStack>
</Box>
);
Shoutem UI:
import { View, Text } from '@shoutem/ui';
const Example = () => (
<View>
<Text>Hello World</Text>
</View>
);
Summary
NativeBase offers more extensive theming and customization options, along with better TypeScript support. However, it comes with a steeper learning curve and larger bundle size. Shoutem UI provides a simpler API and smaller footprint but may lack some advanced features. The choice between the two depends on project requirements, team expertise, and performance considerations.
UI Components Library for React Native
Pros of react-native-ui-lib
- More comprehensive component library with over 60 customizable components
- Active development with frequent updates and bug fixes
- Extensive documentation and examples for each component
Cons of react-native-ui-lib
- Steeper learning curve due to the large number of components and features
- Potentially larger bundle size if not using tree shaking or selective imports
- Some components may have more complex APIs compared to simpler alternatives
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>
);
ui:
import { View, Text, Button } from '@shoutem/ui';
const MyComponent = () => (
<View>
<Text>Hello World</Text>
<Button onPress={() => {}}>
<Text>Click Me</Text>
</Button>
</View>
);
Both libraries provide similar basic components, but react-native-ui-lib offers more customization options and a wider range of pre-built components. The syntax for using components is slightly different, with react-native-ui-lib often providing more props for fine-tuning appearance and behavior.
While ui focuses on simplicity and ease of use, react-native-ui-lib offers a more feature-rich experience at the cost of a steeper learning curve. The choice between the two depends on the project's requirements and the developer's preference for simplicity versus extensive customization options.
:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
Pros of React Native UI Kitten
- More comprehensive theming system with light/dark mode support
- Larger component library with more customization options
- Active development and frequent updates
Cons of React Native UI Kitten
- Steeper learning curve due to more complex API
- Larger bundle size, which may impact app performance
- Less focus on specific UI patterns compared to Shoutem UI
Code Comparison
React Native UI Kitten:
import * as React from 'react';
import { Button, Layout } from '@ui-kitten/components';
export const HomeScreen = () => (
<Layout style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Button>BUTTON</Button>
</Layout>
);
Shoutem UI:
import React from 'react';
import { Screen, Button } from '@shoutem/ui';
export function HomeScreen() {
return (
<Screen>
<Button styleName="secondary">
<Text>BUTTON</Text>
</Button>
</Screen>
);
}
Both libraries offer component-based UI development for React Native, but React Native UI Kitten provides more extensive theming capabilities and a larger set of components. Shoutem UI focuses on specific UI patterns and may be easier to get started with for simpler projects. The code examples show similar basic usage, with React Native UI Kitten using a more explicit layout system and Shoutem UI relying on pre-defined style names.
Cross-Platform React Native UI Toolkit
Pros of React Native Elements
- More extensive component library with a wider range of UI elements
- Better documentation and examples for each component
- More active community and frequent updates
Cons of React Native Elements
- Larger package size, which may impact app performance
- Less customizable styling options out of the box
- Steeper learning curve for beginners due to more complex API
Code Comparison
React Native Elements:
import { Button } from 'react-native-elements';
<Button
title="Click me"
buttonStyle={{ backgroundColor: 'blue' }}
onPress={() => console.log('Button pressed')}
/>
Shoutem UI:
import { Button } from '@shoutem/ui';
<Button styleName="secondary" onPress={() => console.log('Button pressed')}>
<Text>Click me</Text>
</Button>
React Native Elements offers more customization options directly in the component props, while Shoutem UI relies on predefined style names and separate Text components for button content.
Both libraries provide easy-to-use components for React Native development, but React Native Elements offers more flexibility and a larger selection of components. Shoutem UI, on the other hand, provides a more opinionated and consistent design system, which can be beneficial for rapid prototyping and maintaining a cohesive look across your app.
A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
Pros of React Spectrum
- Comprehensive design system with a wide range of accessible components
- Robust documentation and extensive examples
- Strong focus on accessibility and internationalization
Cons of React Spectrum
- Steeper learning curve due to its complexity and extensive API
- Larger bundle size compared to Shoutem UI
- Opinionated design system may require more customization effort
Code Comparison
React Spectrum:
import { Button } from '@adobe/react-spectrum'
function MyComponent() {
return <Button variant="cta">Click me</Button>
}
Shoutem UI:
import { Button } from '@shoutem/ui'
function MyComponent() {
return <Button styleName="secondary">Click me</Button>
}
Both libraries provide easy-to-use component APIs, but React Spectrum offers more customization options out of the box. Shoutem UI focuses on simplicity and mobile-first design, while React Spectrum provides a more comprehensive set of components suitable for complex web applications.
React Spectrum's documentation is more extensive, making it easier for developers to understand and implement advanced features. However, this comes at the cost of a larger learning curve and potentially increased development time for simpler projects.
Shoutem UI's lightweight nature makes it a good choice for mobile-focused applications, while React Spectrum's robust feature set and accessibility focus make it more suitable for enterprise-level web 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 CopilotREADME
Shoutem UI
Shoutem UI is a set of styleable components that enables you to build beautiful React Native applications for iOS and Android. All of our components are built to be both composable and customizable. Each component has a predefined style that is compatible with the rest of the Shoutem UI, which makes it possible to build complex components that look great without the need to manually define complex styles.
Install
These instructions are valid for React Native 0.60.0 and higher. If you're running a lower version, please use v1.X.X.
$ npm install --save @shoutem/ui
We have a postinstall
script which will add @shoutem/ui
's native dependencies to your root package.json
in order to support autolinking and pod installation.
Optional: Link the font files to your iOS and Android projects using react-native-asset
:
$ npx react-native-asset node_modules/@shoutem/ui/fonts
Not doing this will result in dismissable red screen errors about unknown font names, as well as the default system fonts being used on iOS and Android when a Shoutem UI font is meant to be used, so we suggest running this step.
Docs
All the documentation is available on the Developer portal.
Community
Join our community on Facebook. Also, feel free to ask a question on Stack Overflow using "shoutem" tag.
UI Toolkit
Shoutem UI is a part of the Shoutem UI Toolkit that enables you to build professional looking React Native apps with ease.
It consists of three libraries:
- @shoutem/ui: beautiful and customizable UI components
- @shoutem/theme: âCSS-wayâ of styling entire app
- @shoutem/animation: declarative way of applying ready-made animations
License
The BSD License Copyright (c) 2016-present, Shoutem
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
Cross-Platform React Native UI Toolkit
A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
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