Product Row List
Columns of compact product rows (thumbnail, name, stars, price) under a ruled heading, for best sellers, on sale, top rated and new lists above a footer.
npx shadcn@latest add https://ui.develop-better-solutions.com/r/product-row-list.jsonUsage
product-row-list-example.tsx
import { ProductRowList, type RowProduct } from "@dbs/ui";
const imgs = ["steps-boxes.jpg", "torus.png"];
const p = (id: string, name: string, price: string, i: number, extra?: Partial<RowProduct>): RowProduct => ({ id, name, price, image: `/samples/${imgs[i % imgs.length]}`, rating: 4 + (i % 2), ...extra });
export default function ProductRowListExample() {
return (
<ProductRowList
columns={[
{ title: "Best sellers", href: "#", products: [p("a", "Nordic lounge chair", "2,490 MAD", 0), p("b", "Oak side table", "890 MAD", 1), p("c", "Linen throw", "420 MAD", 2)] },
{ title: "On sale", href: "#", products: [p("d", "Glass table lamp", "540 MAD", 3, { oldPrice: "690 MAD" }), p("e", "Wool cushion", "260 MAD", 0, { oldPrice: "320 MAD" }), p("f", "Ceramic vase", "310 MAD", 1)] },
{ title: "Top rated", href: "#", products: [p("g", "Walnut desk", "3,900 MAD", 2), p("h", "Floor lamp", "1,190 MAD", 3), p("i", "Reading chair", "2,150 MAD", 0)] },
{ title: "New in", href: "#", products: [p("j", "Rattan stool", "640 MAD", 1), p("k", "Brass candle holder", "180 MAD", 2), p("l", "Stone planter", "380 MAD", 3)] },
]}
/>
);
}

