Create a Card View in React native using react-native-paper
Approach: In this article, we will see how to create a card-like view in react native without using much CSS. Here, we are going to create a card that will have a title on the top, an image, a paragraph that will provide an image description, and a button.
Below is the step by step implementation
Step 1: Create a react-native project
npx react-native init DemoProject
Step 2: Now install react-native-paper
npm install react-native-paper
Step 3: Create a components folder inside your project. Inside the components folder create a file Cards.js
Project Structure: It will look like the following.
Step 4: Now we will create a simple card-like view. We can use card components directly from the react-native-paper library.
Step 5: Now, import CreateCard in your App.js :
Step to run the application: Save your Changes. Open the terminal and type the following command.
npx react-native run-android