Skip to content
Related Articles

Related Articles

React Rebass Background Image Card Component

Improve Article
Save Article
  • Last Updated : 14 Feb, 2022
Improve Article
Save Article

React Rebass is a front-end framework that was designed keeping react in mind. In this article, we will know how to use Background Image Card Component in React rebass. Background Image Card  is an important component that is required in each development. So to create a Background Image Card component we can import the Rebass Background Image Card component.

Background Image Card component is used to import a background image in a card.


<Box backgroundImage: 'url(link)'></Box>

Creating React Application And Installing Module:

Step 1: Create a React application using the following command.

npx create-react-app foldername

Step 2: After creating your project folder i.e. foldername, move to it using the following command.

cd foldername

Step 3: Install React Rebass in your given directory.

npm i rebass

Project Structure: It will look like the following.

Project structure

Example: This is the basic example that shows how to use the Background Image Card component.


import React from "react";
import { Box, Heading } from "rebass";
const App = () => {
  return (
    <div id='gfg'>
      <h4>React Rebass Background Image Card Component</h4>
          px: 4,
          py: 6,
          width: 825,
          borderRadius: 8,
          color: 'green'
          fontSize={[5, 6]}>
export default App;

Step to Run Application: Run the application from the root directory of the project, using the following command.

npm start



My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!