Product Information Tabs
A tabbed product-details section for a product page: Description, a checklist of Features, a Specifications table, star-rated Reviews, and Shipping info. Switching tabs is real client state, not CSS-only show/hide.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its avatar, avatar-initials dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/product-information-tabs.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/ecommerce/ecommerce2.tsx instead.
Usage
The file also exports ecommerce2Demo, 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 { Ecommerce2, ecommerce2Demo } from "@/components/blocks/ecommerce/ecommerce2"; export default function Page() { return <Ecommerce2 {...ecommerce2Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| productName | string | "Product details" | Heading shown above the tab list. |
| description | string | none | Body copy for the Description tab. |
| features | string[] | none | Bullet points for the Features tab, each shown with a check icon. |
| specifications | SpecItem[] | none | Key/value rows rendered as a table in the Specifications tab. |
| reviews | ReviewItem[] | none | Review cards for the Reviews tab. |
| shippingSummary | string | none | Intro paragraph for the Shipping tab. |
| shippingBullets | string[] | none | Bullet points under the shipping summary. |
| className | string | none | Extra classes for the outer section element. |
Types
interface SpecItem { label: string; value: string; } interface ReviewItem { id: string; name: string; rating: number; // 1-5 date: string; comment: string; }
Behavior notes
- Tab switching is real client state (`useState`), the active panel fully swaps rather than being hidden with CSS, so only the selected tab's content is ever in the DOM.
- The active tab gets a bottom border plus a foreground text color; inactive tabs stay muted, this is the only "indicator", there's no separate sliding underline element.
- Star ratings in the Reviews tab are purely decorative output of each review's fixed `rating` value, there's no interactive rating input anywhere in this block.
- Reviewer avatars always render initials via `initialsFromName`, this block has no prop for a reviewer photo.
- The Specifications tab is a plain hand-written `<table>`, there is no Table primitive in this UI kit.
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.
collection-showcase-grid
Collection Showcase Grid
A large featured-collection hero card alongside a grid of smaller supporting collection tiles.
shop-by-brand-grid
Shop by Brand Grid
A grid of bordered brand tiles with a wordmark-style name, product count, and a hover affordance.
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.