DevPlatform
Home
Components
Search
Submit
Earn
Login
Sign Up Free
Cofee Card - Preview | DevPlatform
DevPlatform
Categories
Accordion
Animation
Box Shadow
Button
Card
Footer
Form
Gallery
Hero Section
Inputs
Loader
Marquee
Modal
Modules
Navbar
Progress Bar
Radio Buttons
Search-Bar
Sections
Slider
Tab
Timeline
Toggle
Cofee Card
jitesh208
Jan 28, 2026
2
0
Share
Live Preview
Refresh
Live Editor
HTML
CSS
JS
HTML
CSS
JavaScript
1
<div class="coffee-card"> <div class="left"> <div class="cup-wrap"> <div class="saucer"></div> <div class="cup"></div> </div> <div class="text"> <h3>Cafe Latte</h3> <p>Large<br>2% Milk</p> <div class="shots">3 Shots</div> </div> </div> <div class="controls"> <div class="btn">−</div> <div class="btn">+</div> </div> </div>
1
*{ box-sizing:border-box; font-family:'Inter',sans-serif; } body{ min-height:100vh; display:grid; place-items:center; background:#f6f6f8; } /* Card */ .coffee-card{ width:430px; height:150px; background:linear-gradient(135deg,#f7b24a,#ff8f3d); border-radius:34px; padding:20px 22px; display:flex; align-items:center; justify-content:space-between; box-shadow: 0 20px 45px rgba(255,143,61,.45), inset 0 1px 0 rgba(255,255,255,.6); } /* Left section */ .left{ display:flex; gap:16px; align-items:center; } /* Cup container */ .cup-wrap{ width:70px; height:70px; border-radius:18px; background:#111; display:grid; place-items:center; box-shadow:0 10px 22px rgba(0,0,0,.35); } /* Cup */ .cup{ position:relative; width:40px; height:32px; background:#fff; border-radius:0 0 10px 10px; } /* Coffee foam */ .cup::before{ content:""; position:absolute; top:-8px; left:0; width:100%; height:12px; background:radial-gradient(circle,#f5d7b2,#d9b48a); border-radius:10px; } /* Handle */ .cup::after{ content:""; position:absolute; right:-8px; top:8px; width:12px; height:16px; border:3px solid #fff; border-left:none; border-radius:0 10px 10px 0; } /* Saucer */ .saucer{ position:absolute; bottom:12px; width:48px; height:8px; background:#e5e5e5; border-radius:50%; } /* Text */ .text h3{ font-size:22px; color:#fff; margin-bottom:4px; } .text p{ font-size:14px; color:rgba(255,255,255,.85); line-height:1.4; } /* Shots pill */ .shots{ margin-top:14px; padding:10px 18px; border-radius:999px; background:rgba(255,255,255,.25); color:#fff; font-weight:600; font-size:14px; width:max-content; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35); } /* Controls */ .controls{ display:flex; gap:12px; } .btn{ width:56px; height:56px; border-radius:18px; background:rgba(255,255,255,.35); display:grid; place-items:center; font-size:26px; color:#fff; box-shadow: 0 10px 20px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.7); cursor:pointer; transition:.2s ease; } .btn:hover{ transform:translateY(-2px); }
1
Comments
0
Want to comment?
Please
login
or
sign up
to post comments.
No comments yet
Be the first to comment on this component!
Comments 0
Want to comment?
Please login or sign up to post comments.
No comments yet
Be the first to comment on this component!