Steps to create React App and install required modules
Step 1: Create a React application using the following command:
npx create-react-app vertical-col
Step 2: After creating your project folder(i.e. vertical-col), move to it by using the following command:
cd vertical-col
Step 3: Now install react-bootstrap in your working directory i.e. vertical-col by executing the below command in the VScode terminal:
npm install react-bootstrap bootstrap
Step 4: Now we need to Add Bootstrap CSS to the index.js file:
import 'bootstrap/dist/css/bootstrap.min.css';
How to make columns stack vertically on smaller screens in React Bootstrap?
In the article, we used different components like rows, columns, etc. to display and deliver the information to the user. However, on smaller screen devices, there is an issue with the representation of these components. So, to handle the columns on the smaller screens, we can use grid classes and FlexBox classes provided by React Bootstrap.
Table of Content
- Using Bootstrap Grid Classes
- Using Flexbox Classes with React Bootstrap