Staaarter

Tabbed Phase Showcase

A tabbed feature showcase: a centered header sits above a row of tab triggers, and clicking a tab swaps a rounded image alongside that phase's title and description below it.

By Staaarter Team
Feature
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/tabbed-phase-showcase.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature46.tsx instead.

Usage

The file also exports feature46Demo, 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 { Feature46, feature46Demo } from "@/components/blocks/feature/feature46";

export default function Page() {
  return <Feature46 {...feature46Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringnoneSmall label above the heading.
headingReactNodenoneSection heading.
descriptionstringnoneSupporting copy under the heading.
tabsTab[]nonePhases; the active tab's image, title and description render below the tab row.
classNamestringnoneExtra classes for the outer section element.

Types

type Tab = {
  label: string;
  title: string;
  description: string;
  image?: { src: string; alt: string };
};

Behavior notes

  • Real client-side state: clicking a tab trigger switches the active phase via useState, swapping the image, title and description shown below.
  • The first tab (index 0) is active by default on mount.
  • "use client" component, so its demo props live in the sibling feature46.demo.tsx file per this repo's client/demo-file-split rule, not in feature46.tsx itself.
  • role="tablist"/"tab"/"tabpanel" with aria-selected and aria-controls wire the tabs together for screen readers.