DevPlatform
Home
Components
Search
Submit
Earn
Login
Sign Up Free
Rating 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
Rating Card
rohitwushu
Jan 27, 2026
2
0
Share
Live Preview
Refresh
Live Editor
HTML
CSS
JS
HTML
CSS
JavaScript
1
<div class="rating-card"> <div class="header"> <div class="left"> <div class="icon">⭐</div> <div> <h3>Rate Our Product</h3> <p>Provide us with feedback</p> </div> </div> ✕ </div> <div class="score"> <h1>4.5</h1> <div> <div class="stars">★★★★★</div> <small>4.5 • 5.2K Ratings • 18 reviews</small> </div> </div> <div class="bars"> <div class="bar-row"><span>5.0</span><div class="bar"><div class="fill"></div></div>⭐</div> <div class="bar-row"><span>4.0</span><div class="bar"><div class="fill"></div></div>⭐</div> <div class="bar-row"><span>3.0</span><div class="bar"><div class="fill"></div></div>⭐</div> <div class="bar-row"><span>2.0</span><div class="bar"><div class="fill"></div></div>⭐</div> <div class="bar-row"><span>1.0</span><div class="bar"><div class="fill"></div></div>⭐</div> </div> <div class="footer"> <button>✏️ Write a Review</button> </div> </div>
1
* { box-sizing: border-box; font-family: 'Inter', sans-serif; } body { min-height: 100vh; display: grid; place-items: center; background: #e6e6e6; } /* Card */ .rating-card { width: 380px; background: #fff; border-radius: 18px; box-shadow: 0 30px 70px rgba(0,0,0,.15); overflow: hidden; animation: fadeUp .6s ease; } @keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* Header */ .header { padding: 16px 18px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between; } .header .left { display: flex; gap: 10px; align-items: center; } .header .icon { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ddd; display: grid; place-items: center; } .header h3 { font-size: 15px; } .header p { font-size: 12px; color: #777; } /* Score */ .score { display: flex; align-items: center; gap: 14px; padding: 18px; } .score h1 { font-size: 42px; } .stars { color: #f6b443; font-size: 16px; } .score small { display: block; font-size: 13px; color: #666; margin-top: 6px; } /* Bars */ .bars { padding: 0 18px 16px; } .bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; } .bar { flex: 1; height: 8px; background: #f1f1f1; border-radius: 999px; overflow: hidden; } .fill { height: 100%; background: #f6b443; width: 0; animation: fillBar 1.2s ease forwards; } .bar-row:nth-child(1) .fill { width: 80%; } .bar-row:nth-child(2) .fill { width: 65%; } .bar-row:nth-child(3) .fill { width: 45%; } .bar-row:nth-child(4) .fill { width: 25%; } .bar-row:nth-child(5) .fill { width: 12%; } @keyframes fillBar { from { width: 0; } } /* Button */ .footer { padding: 16px; border-top: 1px solid #eee; } .footer button { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid #ddd; background: #fff; font-weight: 600; cursor: pointer; transition: .25s ease; } .footer button:hover { background: #f9f9f9; 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!