# Ecommerce Category Preview: Expandable Preview

A category preview where each tile expands to reveal more products on click, keeping the storefront tidy while shoppers dig into one collection at a time.

- Page: https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/expandable-preview
- Collection: [Ecommerce](https://www.shadcn-ui-blocks.com/blocks/ecommerce), Free tier
- Group: [Category Preview](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview)
- Created: 2026-06-14
- Preview image: https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/expandable-preview.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/ecommerce-category-preview-expandable-preview
```

A free block: it installs with no account or key. Or install it by URL: `npx shadcn@latest add "https://www.shadcn-ui-blocks.com/r/ecommerce-category-preview-expandable-preview.json"`.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: badge, button, card, collapsible
- Installs to: `@/components/blocks/ecommerce/category-preview/expandable-preview`

## About this block

Expandable Preview stacks categories as cards in a narrow centered column.
Each card has a tinted header row with a title, a short description, and a
chevron toggle button. Below the header sits a wide aspect banner image
with a subtle overlay, and over that image a row of badges showing the
star rating, review count, product count, and price range at a glance.

Clicking the chevron opens a collapsible panel beneath the image. That
panel holds three sections in sequence: a three column grid of icon feature
tiles, a two column specifications list of key/value pairs, and a three
column shipping row covering delivery, returns, and warranty. A full width
call to action button closes the panel. Only one category can be open at
a time, so the rest of the column stays compact while the shopper reads
the expanded detail.

## When to use

Reach for this layout when your store page needs to communicate meaningful
technical detail per category without sprawling into a long scroll by
default. It suits a tools or software marketplace where each category
carries specs and policies that matter to the buyer before they click
through. Compared to the grid or three column alternatives that show
everything at once, the expandable approach lets you put richer content
in front of buyers who want it while keeping the initial view clean for
those who are still browsing.

A natural flow around it on an Ecommerce page:

**Before**

- A short hero or promo section to set the storefront context
- [Category Filters](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-filters) so shoppers can
  narrow to the category they want before the cards appear

**After**

- [Product List](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-list) to follow up once a
  shopper expands a category and clicks through
- [Trust Guarantee](https://www.shadcn-ui-blocks.com/blocks/ecommerce/ecommerce-trust-guarantee) to
  reinforce the warranty and returns messaging already visible in the
  expanded panel

## What you can customize

Each card is driven by a category object, so all visible text and numbers
come from your data. Three areas worth noting:

- **Category cards.** Add or remove entries in the categories array to
  control how many cards appear. Each card is independent so removing one
  does not affect the others.
- **Feature tiles and specifications.** Each category carries its own
  features array and specifications map. Swap the icons, rewrite the
  labels, or add more rows to match the attributes your buyers care about.
- **Shipping and returns panel.** The three delivery, returns, and warranty
  fields are plain strings, so you can reflect any policy your store uses
  without touching the layout.

> Tip: keep the specifications list to five or six rows per category so
> the expanded panel stays readable without becoming a wall of text.

## More in Ecommerce Category Preview

- [Carousel Preview](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/carousel-preview)
- [Grid Preview](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/grid-preview)
- [Magazine Preview](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/magazine-preview)
- [Scrolling Preview](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/scrolling-preview)
- [Split Preview](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/split-preview)
- [Three Column Preview](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/three-column-preview)
