ReactJS Reactstrap Media Component Last Updated : 07 Mar, 2024 Comments Improve Suggest changes Like Article Like Report Reactstrap is a bootstrap-based react UI library that is used to make good-looking webpages with its seamless and easy-to-use component. In this article, we will see how to use the Media Component in Reactstrap. The media component is used to add some media to our project. Properties: Tag: In ReactStrap Media Component, Tag is a property that is used to set the tag in the component. It takes string and function values.className: In ReactStrap Media Component className define the class name of the component. With the help of className, you can add the styling using CSS.heading: In ReactStrap Media Component heading is the property in reactStrap is used to set the heading in the text. It takes a boolean value as the default argument.middle: In the reactStrap, the middle property is used to set the middle alignment between the two objects. It takes a boolean value.fluid: In ReactStrap Media Component fluid is applies .container-fluid class and if string then it applies .container-{breakpoint} class.block: In ReactStrap Media Component block props are used to indicate whether the block should have a block style or not.color: The color props in the reactStrap are used to set the color of the element in the component.body: The body properties in the media component are used to set the body of the element. By default, it takes a boolean value.bottom: The bottom properties are used to fix the position in the bottom of the components. It should be true or false, it takes a boolean value.children: children properties are used to set the children of the element in components. It takes a node value.heading: heading properties is used to set the heading of the element, by default it takes a boolean value.left: left properties are used to set the alignment of the element on the left side of the component, it takes a boolean value .<Media> Content </media> Creating React Application And Installing Module: Step 1: Create a React application using the following command.npx create-react-app foldernameStep 2: After creating your project folder i.e. folder name, move to it using the following command.cd foldernameStep 3: Install Reactstrap in your given directory. npm install --save reactstrap react react-domStep 4: Import the element to be used in the project.import {Media} from 'reactstrap' Project Structure: It will look like the following. Project Structure: Step to Run Application: Run the application from the root directory of the project, using the following command. npm start Example 1: This is the basic example that shows how to use the media component. Filename: App.js javascript import React from "react"; import { Media } from "reactstrap"; import "bootstrap/dist/css/bootstrap.min.css"; export default function App() { return ( <div className="App"> <Media> <Media left href="#"> <Media object src= "https://media.geeksforgeeks.org/wp-content/cdn-uploads/20210728124621/geekslogo.png" alt="cat" /> </Media> <Media body> <br></br> <Media heading>GFG DSA Course</Media> <br></br> I Want to learn DSA but don't know where to start? Don't worry, this course is a complete package for you to learn all the concepts at your own pace. It's perfect for students and working professionals who know at least anyone coding language. </Media> </Media> </div> ); } Output:Â Example 2: In this example, we will see how to use tag property in media. App.js JavaScript import React from 'react'; import { Media } from 'reactstrap'; const gfg = (props) => { return ( <div id='gfg'> <br /> <Media tag='a' href= 'https://www.geeksforgeeks.org/'> <Media body> <Media heading> GeeksforGeeks </Media> Reactstrap is a bootstrap based react UI library that is used to make good looking webpages with its seamless and easy to use component. </Media> </Media> </div> ); } export default gfg; Output:Â Comment More infoAdvertise with us Next Article ReactJS Reactstrap Media Component taran910 Follow Improve Article Tags : JavaScript Web Technologies ReactJS Reactstrap Similar Reads JavaScript Tutorial JavaScript is a programming language used to create dynamic content for websites. It is a lightweight, cross-platform, and single-threaded programming language. It's an interpreted language that executes code line by line, providing more flexibility.JavaScript on Client Side: On the client side, Jav 11 min read Web Development Web development is the process of creating, building, and maintaining websites and web applications. It involves everything from web design to programming and database management. Web development is generally divided into three core areas: Frontend Development, Backend Development, and Full Stack De 5 min read React Interview Questions and Answers React is an efficient, flexible, and open-source JavaScript library that allows developers to create simple, fast, and scalable web applications. Jordan Walke, a software engineer who was working for Facebook, created React. Developers with a JavaScript background can easily develop web applications 15+ min read React Tutorial React is a JavaScript Library known for front-end development (or user interface). It is popular due to its component-based architecture, Single Page Applications (SPAs), and Virtual DOM for building web applications that are fast, efficient, and scalable.Applications are built using reusable compon 8 min read JavaScript Interview Questions and Answers JavaScript (JS) is the most popular lightweight, scripting, and interpreted programming language. JavaScript is well-known as a scripting language for web pages, mobile apps, web servers, and many other platforms. Both front-end and back-end developers need to have a strong command of JavaScript, as 15+ min read Domain Name System (DNS) DNS is a hierarchical and distributed naming system that translates domain names into IP addresses. When you type a domain name like www.geeksforgeeks.org into your browser, DNS ensures that the request reaches the correct server by resolving the domain to its corresponding IP address.Without DNS, w 8 min read NodeJS Interview Questions and Answers NodeJS is one of the most popular runtime environments, known for its efficiency, scalability, and ability to handle asynchronous operations. It is built on Chromeâs V8 JavaScript engine for executing JavaScript code outside of a browser. It is extensively used by top companies such as LinkedIn, Net 15+ min read HTML Interview Questions and Answers HTML (HyperText Markup Language) is the foundational language for creating web pages and web applications. Whether you're a fresher or an experienced professional, preparing for an HTML interview requires a solid understanding of both basic and advanced concepts. Below is a curated list of 50+ HTML 14 min read What is an API (Application Programming Interface) In the tech world, APIs (Application Programming Interfaces) are crucial. If you're interested in becoming a web developer or want to understand how websites work, you'll need to familiarize yourself with APIs. Let's break down the concept of an API in simple terms.What is an API?An API is a set of 10 min read Introduction of Firewall in Computer Network A firewall is a network security device either hardware or software-based which monitors all incoming and outgoing traffic and based on a defined set of security rules it accepts, rejects, or drops that specific traffic. It acts like a security guard that helps keep your digital world safe from unwa 10 min read Like