In order to use bootstrap in React Js, you will need to first install the npm bootstrap package. You will also need to install the react supported bootstrap package.

Step 1: Install bootstrap and react-bootstrap

npm install react-bootstrap bootstrap

Step 2: Import components in code

import Button from 'react-bootstrap/Button';

Step 3: Import bootstrap styles / css

import 'bootstrap/dist/css/bootstrap.min.css';

Step 4: Use imported component

<Button variant="primary">Primary</Button>

Use this guide to learn about components – React-Bootstrap Components.


About the Author


I am Akash Mittal, an overall computer scientist. If you want to guest post, need help in your projects, want to advertise, Feel free to contact me at [email protected]

View All Articles