How to install bootstrap in react js?

Hi Friends 👋,

Welcome To aGuideHub! ❤️

To install bootstrap in React js, we have two ways

  1. Using package manager like npm or yarn
  2. Using CDN Link

Today, I am going to show you, how to install bootstrap using above methods in react js.

Using package manager

To install bootstrap in react js, we can use package manager like npm or yarn it will add bootstrap in react js.

  • For NPM Developers

    npm install react-bootstrap bootstrap
  • For Yarn Developers

    yarn add react-bootstrap bootstrap

Using CDN Link

Another option install bootstrap in react js is CDN Link, we can add CDN link index.html file.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <!-- Including the bootstrap css via CDN -->
    <link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
      integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
      crossorigin="anonymous"
    />

    <title>React-Bootstrap CodeSandbox Starter</title>
  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root"></div>
  </body>
</html>

All the best 👍

Premium Content

You can get all the below premium content directly in your mail when you subscribe us

Books

Interview Questions

Soon You will get CSS, JavaScript, React Js, and TypeScript So Subscribe to it.

Portfolio Template

View | Get Source Code

Cheat Sheets

Cheat Sheets Books are basically Important useful notes which we use in our day-to-day life.

Related Posts