# Ecommerce Category Preview: Scrolling Preview

A category preview that scrolls product cards in a continuous strip, ideal for showing many items while keeping a compact footprint on a collection page.

- Page: https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/scrolling-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/scrolling-preview.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/ecommerce-category-preview-scrolling-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-scrolling-preview.json"`.

## Depends on

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

## About this block

Scrolling Preview opens with a header row: a heading and subheading on
the left, and a pair of arrow buttons on the right that let visitors
page through the strip one viewport width at a time. Below that sits a
horizontally scrollable row of cards that snap into place. Each card
holds a 16:9 image with a soft gradient overlay, then a content area
with a category name, a short description, a row of featured brand
badges, a product count, and a ghost button that slides in on hover.

The heading, subheading, and every card are independent pieces. You can
add or remove cards freely, swap the brand badge list for any short
set of labels, and replace the product count with any secondary stat.
The arrow buttons always scroll by one container width, so the layout
works equally well with three cards or eight.

## When to use

This layout suits a catalog landing page where you have several parallel
collections and want to surface them without committing a tall column of
stacked sections to each one. For an online education platform it works
well as a "Browse by subject" strip, letting learners scan tracks like
Design, Development, and Data Science in a compact band. It holds its
own against the [Grid Preview](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/grid-preview),
which shows everything at once but runs taller; the scrolling strip keeps
the fold clear for a headline or hero above it.

A natural flow around it on an Ecommerce page:

**Before**

- A short hero to introduce the catalog or current promotion
- [Category Filters](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-filters) to let visitors
  narrow by subject or level before they reach the strip

**After**

- [Product List](https://www.shadcn-ui-blocks.com/blocks/ecommerce/product-list) to show individual items
  once a visitor has chosen a category
- [Trust Guarantee](https://www.shadcn-ui-blocks.com/blocks/ecommerce/ecommerce-trust-guarantee) to
  reinforce credibility below the browsing section

## What you can display

Any set of parallel collections that each benefit from a cover image and
a short supporting line. A few directions this frame handles well:

- **Course tracks.** Label each card with a subject area, list a few
  instructor or tool names as badges, and show the course count as the
  stat below.
- **Skill levels.** Arrange cards from beginner to advanced, using the
  description line to set expectations for who each track is for.
- **Featured creators.** Swap categories for instructor profiles, using
  the badge row for topic tags and the count for published lessons.

> Tip: keep the badge row to three items per card so the content area
> stays a consistent height across all cards in the strip.

## More in Ecommerce Category Preview

- [Carousel Preview](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/carousel-preview)
- [Expandable Preview](https://www.shadcn-ui-blocks.com/blocks/ecommerce/category-preview/expandable-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)
- [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)
