

Have fun experimenting with this knowledge.React Bootstrap is ideal for making responsive, fast React apps without unnecessary dependencies and downloads. Here’s an example using the minus icon: įont awesome icons here are of five sizes, sm, md, lg,1x and 2x. Import from can be noticed that the icon names are similar to the normal classes used to call icons using the tag, but its naming convention is also PascalCase. In importing multiple components from react-bootstrap the method used on line 10 is commonly used.The Naming convention for Bootstrap classes as React component is to put a dot after the component name using PascalCase as seen in ‘ Navbar.Brand’ and ‘Card.Body’.For instance: Bootstrap cards have subset classes of card-body and card-title, these all follow, once the card is imported. Once the main component has been imported, subsets of it do not need importing as well.We can confirm that the above dependencies have been installed by checking in the package.json. npm i - save npm install - save npm install - save the sake of this project, this will be sufficient, but there are other installations needed for brand icons or others.

Here are examples that install everything you need and the solid style of icons using each respective package manager. To get started you’ll need to install the following packages into your project using npm. Then in your terminal install Material by typing the following command npm install Step 2.i - Installing Font Awesome Open your terminal, and ensure that you are inside your application’s master folder. We must install the Material-UI to access its different functionalities or components. You can view the default React application by navigating to in your browser. Then, type npm start to launch the development server. Once the installation is complete, open the folder in your code editor. Please note that this build process may take some time depending on your internet speed. Navigate to your desired folder and create a React project by typing the following command in a terminal or cmd. Bonus: Using Font Awesome Icons in React.Using Bootstrap Components in React (reduces the number of classes you have to add).


Bootstrap is many things but in this case, we will treat it as a library that allows us to import and use different components to create a user interface in our React applications.
