Professional Documents
Culture Documents
Date: 14/03/2022
Submitted By:
Muhammad Hassaan
CMS: 288203
Introduction
React is a JavaScript library created by Facebook. React is a tool for building UI components.
React creates a VIRTUAL DOM in memory.
Objectives
The objective of this lab is using the styling concepts of react to design a simple react web page.
The students will design a simple website. Students will explore different styling components.
Tools/Software Requirement
NPM, Node.js, React, HTML, CSS
Previous Knowledge:
HTML, CSS, Javascript (ES6).
Helping Material:
W3Schools: https://www.w3schools.com/react/default.asp
Note:
You can use “https://material-ui.com/” to design different components for your webpage such as
appbar for navigation bar and cards in what we do section.
Install Material-UI's source files via npm. We take care of injecting the CSS needed.
function App() {
Lab Tasks:
Task 1: Design a simple web page using React. You can use components from “https://material-
ui.com/”
Add a name and logo of your choice on the top left corner
Make a top navigation bar on the upper right corner and add 3-4 components (No need to make
pages for components, just make a navigation bar)
Make an introduction section and add a heading, some text and a picture on the page as shown in
the ss
Continue the task 1 and add an about us section below the introduction section.
Add a picture, heading and some text in this section as shown in the ss.
Task 3:
Continue the above tasks and make another section named “what we do”.
Task 1 Code:
Navbar.js:
setAnchorElNav(event.currentTarget);
};
setAnchorElUser(event.currentTarget);
};
setAnchorElNav(null);
};
setAnchorElUser(null);
};
return (
<Container maxWidth="xl">
<Toolbar disableGutters>
<Typography
variant="h6"
noWrap
component="div"
>
</Typography>
<IconButton
size="large"
aria-controls="menu-appbar"
aria-haspopup="true"
onClick={handleOpenNavMenu}
color="inherit"
>
<MenuIcon />
</IconButton>
<Menu
id="menu-appbar"
anchorEl={anchorElNav}
vertical: 'bottom',
horizontal: 'left',
}}
keepMounted
transformOrigin={{
vertical: 'top',
horizontal: 'left',
}}
open={Boolean(anchorElNav)}
onClose={handleCloseNavMenu}
sx={{
}}
>
{pages.map((page) => (
<Typography textAlign="center">{page}</Typography>
</MenuItem>
))}
</Menu>
</Box>
<Typography
variant="h6"
noWrap
component="div"
>
LOGO
</Typography>
{pages.map((page) => (
<Button
key={page}
onClick={handleCloseNavMenu}
>
{page}
</Button>
))}
</Box>
</IconButton>
</Tooltip>
<Menu
id="menu-appbar"
anchorOrigin={{
vertical: 'top',
horizontal: 'right',
}}
keepMounted
transformOrigin={{
vertical: 'top',
horizontal: 'right',
}}
open={Boolean(anchorElUser)}
onClose={handleCloseUserMenu}
>
{settings.map((setting) => (
<Typography textAlign="center">{setting}</Typography>
</MenuItem>
))}
</Menu>
</Box>
</Toolbar>
</Container>
</AppBar>
);
};
return (
<h1>Welcome to Quatify</h1>
<p>
</p>
</Grid>
</Grid>
</Grid>
</Box>
);
Task 2 Code:
About.js:
return (
</Grid>
<h1>About Us</h1>
<p>
</p>
</Grid>
</Box>
);
Task 3 Code:
Card.js:
return (
<div>
<h1>What We do?</h1>
<CardMedia
component="img"
height="140"
image={pro1}
alt="green iguana"
/>
<CardContent>
Web Design
</Typography>
</Typography>
</CardContent>
<CardActions>
<Button size="small">Share</Button>
</CardActions>
<CardMedia
component="img"
height="140"
image={pro1}
alt="green iguana"
/>
<CardContent>
UI/UX
</Typography>
</Typography>
</CardContent>
<CardActions>
<Button size="small">Share</Button>
</CardActions>
</Card>
component="img"
height="140"
image={pro1}
alt="green iguana"
/>
<CardContent>
Graphic Design
</Typography>
</Typography>
</CardContent>
<CardActions>
<Button size="small">Share</Button>
</CardActions>
</Card>
<CardMedia
component="img"
height="140"
alt="green iguana"
/>
<CardContent>
Dev Ops
</Typography>
</Typography>
</CardContent>
<CardActions>
<Button size="small">Share</Button>
</CardActions>
</Card>
<CardMedia
component="img"
height="140"
image={pro1}
alt="green iguana"
/>
Hosting
</Typography>
</Typography>
</CardContent>
<CardActions>
<Button size="small">Share</Button>
</CardActions>
</Card>
<CardMedia
component="img"
height="140"
image={pro1}
alt="green iguana"
/>
<CardContent>
Quality Assurance
</Typography>
</CardContent>
<CardActions>
<Button size="small">Share</Button>
</CardActions>
</Card>
</div>
);
App.js:
import './App.css';
function App() {
return (
<Navbar/>
<h1>Hello World!</h1>
<Intro />
<About />
<Card />
</div>
);
Deliverables
Compile a single word document by filling in the solution part and submit this Word file on
LMS. This lab grading policy is as follows: The lab is graded between 0 to 10 marks. The