{p.name}
{p.tag}
${p.price}
incl. taxes
{p.desc}
import React, { useState } from 'react'; // CuteFashion_Necessities_App.jsx // Single-file React component (Tailwind CSS required in parent project) // Uses shadcn/ui component placeholders (optional). This is a self-contained UI you can drop into a React app. export default function CuteFashionApp() { const sampleProducts = [ { id: 1, name: 'Petal Heart Crossbody', price: 34, tag: 'Bags', desc: 'Small crossbody bag with heart print — perfect for quick outings.', img: 'https://images.unsplash.com/photo-1520975919868-6a0d6b6a3b23?auto=format&fit=crop&w=800&q=60' }, { id: 2, name: 'Chunky Pearl Hair Clip', price: 12, tag: 'Accessories', desc: 'Shiny pearl clip — elevates any messy bun.', img: 'https://images.unsplash.com/photo-1520975919868-6a0d6b6a3b23?auto=format&fit=crop&w=800&q=60' }, { id: 3, name: 'Cloudy Knit Sweater', price: 48, tag: 'Tops', desc: 'Cozy oversized knit in pastel shades.', img: 'https://images.unsplash.com/photo-1541099649105-f69ad21f3246?auto=format&fit=crop&w=800&q=60' }, { id: 4, name: 'Twirl Mini Skirt', price: 29, tag: 'Bottoms', desc: 'Flared mini skirt that moves with you.', img: 'https://images.unsplash.com/photo-1520975919868-6a0d6b6a3b23?auto=format&fit=crop&w=800&q=60' } ]; const [products] = useState(sampleProducts); const [query, setQuery] = useState(''); const [activeTag, setActiveTag] = useState('All'); const [cart, setCart] = useState([]); const [selected, setSelected] = useState(null); const tags = ['All', ...Array.from(new Set(products.map(p => p.tag)))]; function addToCart(product) { setCart(prev => { const found = prev.find(i => i.id === product.id); if (found) return prev.map(i => i.id === product.id ? { ...i, qty: i.qty + 1 } : i); return [...prev, { ...product, qty: 1 }]; }); } function changeQty(id, delta) { setCart(prev => prev .map(i => i.id === id ? { ...i, qty: i.qty + delta } : i) .filter(i => i.qty > 0) ); } function total() { return cart.reduce((s, i) => s + i.price * i.qty, 0).toFixed(2); } const visible = products.filter(p => { const matchesQuery = (p.name + p.desc).toLowerCase().includes(query.toLowerCase()); const matchesTag = activeTag === 'All' ? true : p.tag === activeTag; return matchesQuery && matchesTag; }); return (
Essentials for every cute outfit
Showing {visible.length} results
{p.tag}
${p.price}
incl. taxes
{p.desc}