Restaurant Menu Html Css Codepen Review

/* menu card style */ .menu-card background: white; border-radius: 28px; overflow: hidden; transition: all 0.25s ease-in-out; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02), 0 0 0 1px #f0e7dd; .menu-card:hover transform: translateY(-6px); box-shadow: 0 22px 28px -12px rgba(60, 40, 20, 0.12), 0 0 0 1px #e7d8c8; .card-img width: 100%; height: 180px; object-fit: cover; background: #ddd0be; display: block; transition: transform 0.4s ease; .menu-card:hover .card-img transform: scale(1.02); .card-content padding: 1.3rem 1.3rem 1.5rem; .dish-header display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; .dish-name font-family: 'Playfair Display', serif; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.2px; color: #2f241b; .dish-price font-weight: 700; font-size: 1.3rem; color: #b45f2b; background: #fef5ea; padding: 0.1rem 0.7rem; border-radius: 40px; font-family: monospace; letter-spacing: 0.5px; .dish-desc font-size: 0.88rem; color: #6a5a48; line-height: 1.45; margin: 12px 0 0; border-left: 2px solid #e9daca; padding-left: 12px; .dish-meta margin-top: 12px; display: flex; gap: 12px; font-size: 0.7rem; font-weight: 500; text-transform: uppercase; color: #aa855f; .dish-meta i margin-right: 4px; font-size: 0.7rem; .badge-cat display: inline-block; background: #f3ede5; border-radius: 20px; padding: 2px 10px; font-size: 0.7rem; font-weight: 500; color: #8b5a36;

<script> // ---------- RESTAURANT MENU DATA (realistic, diverse) ---------- const menuData = [ // Appetizers id: 1, name: "Burrata Caprese", price: "$16", category: "Appetizers", desc: "Creamy burrata, heirloom tomatoes, aged balsamic, basil oil & grilled sourdough.", icon: "fa-seedling", img: "https://images.unsplash.com/photo-1601050690597-df0568f70950?w=500&auto=format", dietary: "veg" , id: 2, name: "Truffle Arancini", price: "$14", category: "Appetizers", desc: "Crispy risotto balls, wild mushroom ragu, truffle aioli & parmesan.", icon: "fa-mushroom", img: "https://images.unsplash.com/photo-1546069901-ba9599a7e63c?w=500&auto=format", dietary: "veg" , id: 3, name: "Lamb Keftedes", price: "$18", category: "Appetizers", desc: "Greek-style lamb meatballs, tzatziki, pickled red onion & fresh mint.", icon: "fa-drumstick-bite", img: "https://images.unsplash.com/photo-1559847844-5315695dadae?w=500&auto=format", dietary: "meat" , // Main Courses id: 4, name: "Seared Sea Bass", price: "$34", category: "Mains", desc: "Mediterranean sea bass, saffron orzo, citrus beurre blanc, fennel slaw.", icon: "fa-fish", img: "https://images.unsplash.com/photo-1519708227418-c8fd9a32b7a2?w=500&auto=format", dietary: "seafood" , id: 5, name: "Porcini Risotto", price: "$27", category: "Mains", desc: "Carnaroli rice, wild porcini, parmesan cream, truffle oil & crispy sage.", icon: "fa-bowl-food", img: "https://images.unsplash.com/photo-1476124369491-e7addf5db371?w=500&auto=format", dietary: "veg" , id: 6, name: "Braised Short Rib", price: "$39", category: "Mains", desc: "Red wine braised beef, creamy parsnip purée, roasted carrots & gremolata.", icon: "fa-utensils", img: "https://images.unsplash.com/photo-1600891964092-4316c288032e?w=500&auto=format", dietary: "meat" , id: 7, name: "Herb Chicken Paillard", price: "$28", category: "Mains", desc: "Free-range chicken, lemon-herb marinade, arugula, shaved fennel & aged parmesan.", icon: "fa-egg", img: "https://images.unsplash.com/photo-1604909052743-94ab495dffb9?w=500&auto=format", dietary: "meat" , // Pasta & Risotto section (additional) id: 8, name: "Lobster Ravioli", price: "$36", category: "Pasta", desc: "House-made ravioli, maine lobster, saffron cream, chervil & toasted breadcrumbs.", icon: "fa-lobster", img: "https://images.unsplash.com/photo-1563379926898-05f4575a45e8?w=500&auto=format", dietary: "seafood" , id: 9, name: "Cacio e Pepe", price: "$22", category: "Pasta", desc: "Roman classic, tonnarelli pasta, pecorino romano, toasted black pepper & butter.", icon: "fa-cheese", img: "https://images.unsplash.com/photo-1551183053-bf91a1d81141?w=500&auto=format", dietary: "veg" , // Desserts id: 10, name: "Salted Caramel Tart", price: "$12", category: "Desserts", desc: "Dark chocolate shell, salted caramel ganache, vanilla bean chantilly & fleur de sel.", icon: "fa-cake-candles", img: "https://images.unsplash.com/photo-1587314168485-3236d6710814?w=500&auto=format", dietary: "veg" , id: 11, name: "Lemon Ricotta Cake", price: "$11", category: "Desserts", desc: "Whipped ricotta, lemon curd, wild berries & honeycomb crumble.", icon: "fa-lemon", img: "https://images.unsplash.com/photo-1571115177098-24ec42ed204d?w=500&auto=format", dietary: "veg" , id: 12, name: "Affogato al Caffè", price: "$9", category: "Desserts", desc: "Vanilla gelato, espresso shot, amaretti cookie crumble & dark chocolate shavings.", icon: "fa-mug-hot", img: "https://images.unsplash.com/photo-1579954115545-a95591f28bfc?w=500&auto=format", dietary: "veg" , // Drinks / Cocktails id: 13, name: "Elderflower Spritz", price: "$13", category: "Drinks", desc: "Elderflower liqueur, prosecco, soda, fresh mint & cucumber ribbon.", icon: "fa-wine-glass", img: "https://images.unsplash.com/photo-1560512823-829485b8bf24?w=500&auto=format", dietary: "veg" , id: 14, name: "Smoked Old Fashioned", price: "$16", category: "Drinks", desc: "Bourbon, maple bitters, smoked with cherrywood & orange zest.", icon: "fa-whiskey-glass", img: "https://images.unsplash.com/photo-1470337458703-46ad1756a187?w=500&auto=format", dietary: "veg" , id: 15, name: "Rosemary Paloma", price: "$14", category: "Drinks", desc: "Tequila, grapefruit, rosemary syrup, lime & sparkling water.", icon: "fa-cocktail", img: "https://images.unsplash.com/photo-1551024709-8f23befc6f87?w=500&auto=format", dietary: "veg" ]; restaurant menu html css codepen

// Extract unique categories and order (priority: Appetizers, Mains, Pasta, Desserts, Drinks) const categoryOrder = ["Appetizers", "Mains", "Pasta", "Desserts", "Drinks"]; let uniqueCategories = [...new Map(menuData.map(item => [item.category, item.category])).values()]; // sort according to preferred order, then alphabetically for any extra uniqueCategories.sort((a,b) => let indexA = categoryOrder.indexOf(a); let indexB = categoryOrder.indexOf(b); if (indexA !== -1 && indexB !== -1) return indexA - indexB; if (indexA !== -1) return -1; if (indexB !== -1) return 1; return a.localeCompare(b); ); /* menu card style */

Get more After Effects tricks in your inbox.

Check your inbox.

Please confirm your email, so we can keep you in the loop.
Oops! Something went wrong while submitting the form.