How to use Bootstrap in React JS?


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.

Sign Up for Our Newsletters

Get only the best articles delivered to your mail

You May Also Like

How to use React?

This article will help you to know how to use React JS in web applications. React js creates static websites with optimized performance and speed. Step 1: Install create-react-app npm…
View Post