1 of 16

React Bootstrap

Web Technology

Rourab Paul, Subin Sahayam, Assistant Professor,

Department of Computer Science and Engineering

Shiv Nadar University

2 of 16

Introduction - Bootstrap

  1. What is Bootstrap?

Bootstrap is an open-source front-end framework containing ready-made CSS classes and JavaScript components for building responsive websites and web applications.

K1

3 of 16

Introduction - Bootstrap

  1. What is Bootstrap?

K1

4 of 16

Introduction - React Bootstrap

  1. What is React Bootstrap?
    • Reimplementation of Bootstrap – React Component
    • No JQuery or Javascript Dependency
    • Renders React Components

K1

React Bootstrap is a UI framework that provides Bootstrap components as React components. It allows developers to build responsive and attractive web interfaces using Bootstrap's styling while following React's component-based approach.

5 of 16

React Bootstrap - Installation

  1. Three ways
    • Bootstrap Content Delivery Network (CDN)
    • Installing and Importing Bootstrap in React
    • Installing react-bootstrap

K1

6 of 16

React Bootstrap - Installation

  1. Three ways
    • Bootstrap Content Delivery Network (CDN)
    • Installing and Importing Bootstrap in React
    • Installing react-bootstrap
  2. Use react-bootstrap

K1

7 of 16

React Bootstrap - Installation

  1. Three ways
    • Bootstrap Content Delivery Network (CDN)
    • Installing and Importing Bootstrap in React
    • Installing react-bootstrap or reactstrap

  • Use react-bootstrap

K3

8 of 16

React Bootstrap - Importing

  1. From folder
  2. Using {}
  3. Default vs Multiple Components

K3

import Button from 'react-bootstrap/Button';

import Alert from 'react-bootstrap/Alert';

import Card from 'react-bootstrap/Card';

import Form from 'react-bootstrap/Form';

import Navbar from 'react-bootstrap/Navbar';

import Nav from 'react-bootstrap/Nav';

import Container from 'react-bootstrap/Container';

import Modal from 'react-bootstrap/Modal';

import Pagination from 'react-bootstrap/Pagination';

import Offcanvas from 'react-bootstrap/Offcanvas';

App.jsx

9 of 16

React Bootstrap - Example

K3

10 of 16

React Bootstrap - Example

K3

11 of 16

12 of 16

React Bootstrap - Example

K3

npm create vite@latest myapp -- --template react

cd myapp

npm install

npm install react-bootstrap bootstrap

npm run dev

See the default vite page

replace App.jsx and main.jsx in ./src folder

13 of 16

Syllabus

K1

14 of 16

Summary

  1. Introduction – Bootstrap
  2. Introduction – React Bootstrap
  3. React Bootstrap – Installation
  4. React Bootstrap – Example
  5. Syllabus -  Chapter - 1 and 2

K1

15 of 16

References

  1. Robin Wieruch, “The Road to React: The ReactJS with Hooks”, Lean Publishing, 2023 Edition.
  2. Online Sources

16 of 16

THANK YOU