How to use Bootstrap in React JS?

Total
0
Shares

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