Skip to content

Latest commit

 

History

History

react-native-material-elements

README.md

React Native Material Elements

A sophisticated UI library crafted to enhance your React Native development workflow. Designed for simplicity and elegance, material elements provides a rich collection of components and utilities to effortlessly create polished mobile applications.

Installation

Install the package with yarn or npm (react and react-native are peer dependencies and must already be in your app):

yarn add react-native-material-elements

OR

npm install react-native-material-elements

New components

All of them support design="material" and design="ios" and follow the theme (themeVersion, light and dark).

Component Description
Tabs Material tabs with a sliding indicator, iOS bottom tab bar
SearchBar Search field with clear button and an iOS style Cancel button
Fab Floating action button, optionally extended with a label
Link Pressable inline text link
Slider Single value and range slider
Rating Star rating with half star precision
StepProgress Horizontal and vertical multi-step progress
Collapse Animated expand and collapse container
ActionSheet iOS action sheet and Material bottom list sheet
BottomSheet Draggable bottom sheet with snap points
Toast Transient messages with an imperative toast.show() API
Drawer Temporary and persistent side navigation
Tooltip, Popover Anchored overlays
Banner Inline dismissible notice
Breadcrumbs Navigation trail with collapsing
DatePicker, DatePickerModal, TimePicker Pure JS date and time pickers (calendar, wheels), no native dependencies
NavigationBar Material 3 bottom navigation bar with a pill indicator, iOS tab bar
EmptyState Icon, title, description and actions for empty screens and lists
ToggleButtonGroup Exclusive or multiple selection group of toggle buttons
Autocomplete Text input with filtered suggestions, free solo and async options
DataTable Sortable table with row selection, pagination and horizontal scroll

Each component has its own page in the docs site (docs/docs/pages/components).

Theme versions

Choose one of the ready made themes (light and dark colors plus size tokens) with the themeVersion prop. The default is v1.

Version Theme
v1 Default
v2 Material You
v3 iOS
v4 Modern
v5 High Contrast
<ThemeProvider themeVersion="v3" design="ios">
  <App />
</ThemeProvider>

themeVersion (colors and sizes) and design (how the components are drawn) are independent. Your own lightTheme, darkTheme and dimensions always override the selected version. See the theme versions guide.

iOS design

Every component can look and feel like its native iOS counterpart, on iOS and on Android. Choose the design for the whole app with the ThemeProvider:

import { ThemeProvider, Button, Switch } from 'react-native-material-elements';

// 'material' (default) | 'ios'
<ThemeProvider design="ios">
  <Button label="Continue" />
  <Switch />
</ThemeProvider>;

or per component (the component prop always wins over the ThemeProvider):

<Button label="Save" design="ios" />
<Button label="Save" design="material" />

In the ios design the components use the iOS system colors (light and dark), continuous corner radii, opacity press feedback instead of the Material ripple, soft iOS shadows instead of Android elevation and iOS shaped controls (switch, checkbox, alerts, inset grouped lists, segmented control, navigation bar, spinner and more). The default material design is unchanged. See the iOS design guide for the full list.

Table of Contents

Thank You!

We sincerely appreciate you taking the time to read through our documentation. Your attention to detail and commitment to understanding the intricacies of our library is truly valued.

Your feedback and contributions are what make our project better. If you have any questions, suggestions, or run into any issues, please don't hesitate to reach out. Together, we can build something amazing.

Contributions and Feedback

We welcome contributions and feedback from the community. If you have any suggestions, questions, or would like to contribute to the project, please feel free to reach out.

How to Contribute

  1. Fork the repository
  2. Create a new branch (git checkout -b feature-branch)
  3. Make your changes
  4. Commit your changes (git commit -am 'Add new feature')
  5. Push to the branch (git push origin feature-branch)
  6. Create a new Pull Request

Happy coding!