Shop by Brand Grid
A "shop by brand" directory section: a responsive grid of bordered tiles, each showing a brand name as a plain styled wordmark, a product count, and a border/shadow hover affordance, linking through to that brand's page.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/shop-by-brand-grid.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/ecommerce/ecommerce4.tsx instead.
Usage
The file also exports ecommerce4Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Ecommerce4, ecommerce4Demo } from "@/components/blocks/ecommerce/ecommerce4"; export default function Page() { return <Ecommerce4 {...ecommerce4Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Shop by brand" | Section heading; omitted entirely when both heading and description are unset. |
| description | string | none | Supporting copy under the heading. |
| brands | BrandItem[] | none | Brand tiles in the grid, in display order. |
| className | string | none | Extra classes for the outer section element. |
Types
interface BrandItem { name: string; productCount: number; href: string; }
Behavior notes
- Fully static server component with zero event handlers, every tile is a plain `next/link` anchor to `href`.
- There's no logo image or icon slot, the brand name renders as plain bold heading text, a wordmark stand-in rather than a real logo.
- The hover affordance (`hover:border-primary`, `hover:shadow-md`) is pure CSS on the anchor, nothing JavaScript-driven.
- The grid is fixed at 2 columns on mobile, 3 on small screens, and 5 on large screens regardless of how many brands are passed; more than 10 brands wraps to additional rows rather than shrinking tile size.
More Ecommerce Blocks
View all →wishlist-manager
Wishlist Manager
Saved-items list with stock-status badges, move-to-cart and remove actions, and a real empty state.
product-information-tabs
Product Information Tabs
Tabbed product details with Description, Features, Specifications, Reviews, and Shipping panels.
collection-showcase-grid
Collection Showcase Grid
A large featured-collection hero card alongside a grid of smaller supporting collection tiles.
sale-countdown-timer
Sale Countdown Timer
A live days/hours/minutes/seconds countdown in default, compact, or full-width banner layouts.
gift-card-redemption-form
Gift Card Redemption Form
A code-entry form that validates against a fixed list of demo gift cards and shows a real success or error state.
shipping-info-cards
Shipping Info Cards
A row of icon cards covering shipping, delivery, returns, and support promises.