Creating a website "like Apple" involves a combination of clean design, smooth animations, responsiveness, and high-quality images. Apple’s site is known for its minimalistic style, large hero sections, product showcases, and elegant typography.
I can help you get started with a simple React website that mimics some of Apple's style components with HTML, CSS, and JavaScript.
Here’s a basic example using React and CSS:
// App.js
import React from "react";
import "./App.css";
const products = [
{
name: "iPhone 14 Pro",
description: "Pro. Beyond.",
price: "From $999",
image:
"https://www.apple.com/v/iphone/home/aj/images/overview/hero/iphone_14_pro__chcczv6tn0qa_large_2x.jpg",
link: "#"
},
{
name: "MacBook Pro",
description: "Supercharged by M2 Pro and M2 Max.",
price: "From $1999",
image:
"https://www.apple.com/v/macbook-pro-14-and-16/d/images/overview/hero/hero_static__e6khcva4hkeq_large_2x.jpg",
link: "#"
},
{
name: "Apple Watch Series 8",
description: "A healthy leap ahead.",
price: "From $399",
image:
"https://www.apple.com/v/watch/home/ax/images/overview/hero/hero_static__g28bl2ybjz6m_large_2x.jpg",
link: "#"
}
];
function App() {
return (
<div className="app">
<header className="nav">
<div className="logo"></div>
<nav>
<a href="#">Mac</a>
<a href="#">iPhone</a>
<a href="#">Watch</a>
<a href="#">AirPods</a>
<a href="#">Support</a>
</nav>
</header>
<section className="hero">
<h1>The new MacBook Pro</h1>
<p>Supercharged by M2 Pro and M2 Max.</p>
<a href="#" className="btn">
Learn more
</a>
</section>
<section className="products">
{products.map((product) => (
<div key={product.name} className="product-card">
<img src={product.image} alt={product.name} />
<h2>{product.name}</h2>
<p>{product.description}</p>
<p className="price">{product.price}</p>
<a href={product.link} className="btn">
Buy
</a>
</div>
))}
</section>
<footer>
<p>© 2024 Apple Inc. All rights reserved.</p>
</footer>
</div>
);
}
export default App;
And the accompanying CSS; save as App.css:
/* App.css */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
color: #111;
}
.app {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
}
.logo {
font-size: 28px;
}
nav a {
margin-left: 20px;
text-decoration: none;
color: #555;
font-weight: 600;
transition: color 0.3s ease;
}
nav a:hover {
color: #000;
}
.hero {
background: #f5f5f7;
padding: 80px 20px;
text-align: center;
}
.hero h1 {
font-size: 48px;
font-weight: 700;
margin-bottom: 10px;
}
.hero p {
font-size: 24px;
margin-bottom: 30px;
color: #666;
}
.btn {
display: inline-block;
text-decoration: none;
background: #0071e3;
color: #fff;
padding: 14px 24px;
border-radius: 8px;
font-weight: 600;
transition: background 0.3s ease;
}
.btn:hover {
background: #005bb5;
}
.products {
display: flex;
gap: 30px;
margin: 60px 0;
flex-wrap: wrap;
justify-content: center;
}
.product-card {
background: #fff;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
max-width: 300px;
padding: 20px;
text-align: center;
flex: 1 1 300px;
}
.product-card img {
width: 100%;
border-radius: 12px;
margin-bottom: 20px;
}
.product-card h2 {
font-weight: 700;
margin-bottom: 10px;
}
.product-card p {
color: #666;
margin-bottom: 10px;
}
.price {
font-weight: 700;
font-size: 18px;
margin-bottom: 15px;
}
footer {
text-align: center;
color: #999;
margin: 40px 0 20px;
}
How to run:
- Make sure you have Node.js installed.
- Create a new React app via:
npx create-react-app apple-website-clone
cd apple-website-clone
- Replace the contents of
src/App.js and add src/App.css with the code above.
- Run it:
npm start
You’ll get a simple site with:
- A navigation bar with the Apple logo and links.
- A hero section highlighting a product.
- A grid of product cards showing images and info.
- A footer.
This is a starting point. For a full Apple-like experience, you'll want to add:
- Responsive design tweaks for mobile.
- Smooth animations.
- More complex layouts.
- Custom fonts similar to Apple's (like San Francisco).
- More interactive elements.
If you want me to help with any specific feature or styling, just ask!