Top 10 React Bootstrap Components For Every Project

top 10 react bootstrap components

React bootstrap is the frontend components library which is inspired from twitter bootstrap. Let us see 10 components of bootstrap which are very useful in any kind of project.

1. Buttons

Without buttons, there is no action possible. In order to use them we first include buttons component and then define that.

import Button from 'react-bootstrap/Button';

<Button variant="primary">Primary</Button>

2. Images

For images, it provides a number of helpful props like rounded, fluid, thumbnail etc.

import Image from 'react-bootstrap/Image'

    <Col xs={6} md={4}>
      <Image src="..." rounded />

You may also like –

3. Forms

Without forms you can’t take inputs. This is one of the most important html element which is used throughout any application.

import Form from 'react-bootstrap/Form';

<Form.Control type="email" placeholder="Enter email" />
<Form.Control type="password" placeholder="Password" />
<Form.Check type="checkbox" label="Check me out" />
<Form.Control as="select">
<Form.Control type="range" />
<Button variant="primary" type="submit">

When the form is complex and there are multiple buttons, then always set type=”button” in those which do not act as submit button otherwise form will submit with the press of any button.

4. Modals

Modals are used to bring focus of users to something important like errors, forms, notices etc. They are also used to display content without navigating users to different page.

import Modal from 'react-bootstrap/Modal';

  <Modal.Header closeButton>
    <Modal.Title>Modal title</Modal.Title>

    <p>Modal body text goes here.</p>

    <Button variant="secondary">Close</Button>
    <Button variant="primary">Save changes</Button>

5. Navbars

Navbars or navigation bars are the header elements which connects and gives direction to the application. It helps in navigation properly.

import Navbar from 'react-bootstrap/Navbar'
import Nav from 'react-bootstrap/Nav'

<Navbar bg="light" expand="lg">
  <Navbar.Brand href="#home">React-Bootstrap</Navbar.Brand>
  <Navbar.Toggle aria-controls="basic-navbar-nav" />
  <Navbar.Collapse id="basic-navbar-nav">
    <Nav className="mr-auto">
      <Nav.Link href="#home">Home</Nav.Link>
      <Nav.Link href="#link">Link</Nav.Link>
      <NavDropdown title="Dropdown" id="basic-nav-dropdown">
        <NavDropdown.Item href="#action/3.1">Action</NavDropdown.Item>
        <NavDropdown.Item href="#action/3.2">Another action</NavDropdown.Item>
        <NavDropdown.Item href="#action/3.3">Something</NavDropdown.Item>
        <NavDropdown.Divider />
        <NavDropdown.Item href="#action/3.4">Separated link</NavDropdown.Item>

6. Pagination

We can create pagination in react bootstrap using pagination component or button groups.

import Pagination from 'react-bootstrap/Pagination'

  <Pagination.First />
  <Pagination.Prev />
  <Pagination.Ellipsis />

  <Pagination.Item active>{10}</Pagination.Item>
  <Pagination.Next />
  <Pagination.Last />

7. Breadcrumbs

Have you seen any website without breadcrumbs? From the inception of websites to current day, they are playing the role of milestone guide. We can easily know the hierarchy of website by looking at them.

import Breadcrumb from 'react-bootstrap/Breadcrumb'

  <Breadcrumb.Item href="#">Home</Breadcrumb.Item>
  <Breadcrumb.Item href="">
  <Breadcrumb.Item active>Data</Breadcrumb.Item>

8. Cards

Cards are useful for websites like e-commerce where a similar kind of display is needed. They can display images as well as other components like text, buttons, links etc. React bootstrap provides many variants of cards.

import Card from 'react-bootstrap/Card'

  <Col md={4} lg={3}>
      <Card style={{ width: '18rem' }}>
  <Card.Img variant="top" src="....." />
    <Card.Title>Hand Bag</Card.Title>
      A stylish bag made up of Swedish wool.
    <Button variant="primary">Buy Now</Button>

9. Table

Table is one of the few components which are used in a number of areas even not related to computers. Anything which have multiple properties but of same types could be listed in tables. Bootstrap provides a handy component for it.

import Table from 'react-bootstrap/Table'

<Table striped bordered hover>
      <th>First Name</th>
      <th>Last Name</th>
      <td colSpan="2">Larry the Bird</td>

10. Alerts

These are the small bars to display notices and errors.

import Alert from 'react-bootstrap/Alert'

<Alert variant={'primary'}>
    This is an alert!

These are the 10 components which are used in all the web applications. See you in next article.