Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions docs/6.x/docs/guides/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ import Tabs from '@docs/components/Tabs';

## Installation

React Native Paper 6.x requires React 19 and React Native's New Architecture.

Open a Terminal in your project's folder and install the library:

```bash npm2yarn
npm install react-native-paper
npm install react-native-paper@alpha
```

React Native Paper 6.x is a prerelease published under the npm `alpha` tag, and `npm install react-native-paper` without the tag still installs 5.x.

React Native Paper uses [react-native-safe-area-context](https://github.com/th3rdwave/react-native-safe-area-context) for handling safe area, [react-native-reanimated](https://docs.swmansion.com/react-native-reanimated/) and [react-native-worklets](https://docs.swmansion.com/react-native-worklets/) for animations.

<Tabs groupId="expo-vs-cli">
Expand All @@ -32,7 +36,13 @@ Minimum requirements:

Follow the [React Native Reanimated installation guide](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/).

If you use Expo, you don't need to install vector icons - those are the part of the expo package. However, if you have a `babel.config.js` or `.babelrc` file, make sure that it includes `babel-preset-expo`.
You also need to install [@react-native-vector-icons/material-design-icons](https://github.com/oblador/react-native-vector-icons/tree/master/packages/material-design-icons), because some components use these icons internally:

```bash
npx expo install @react-native-vector-icons/material-design-icons
```

If you have a `babel.config.js` or `.babelrc` file, make sure that it includes `babel-preset-expo`.

</TabItem>
<TabItem value="community-cli" label="Community CLI">
Expand Down Expand Up @@ -168,16 +178,13 @@ Example:

```js
import * as React from 'react';
import {
MD3LightTheme as DefaultTheme,
PaperProvider,
} from 'react-native-paper';
import { LightTheme, PaperProvider } from 'react-native-paper';
import App from './src/App';

const theme = {
...DefaultTheme,
...LightTheme,
colors: {
...DefaultTheme.colors,
...LightTheme.colors,
primary: 'tomato',
secondary: 'yellow',
},
Expand Down
Loading