Staaarter

Feature with Side Heading and Custom Tabs

A two-column feature section with a badge, heading, and multi-paragraph copy on the left, and a hand-built tab strip with a matching content panel on the right. Clicking a tab is real client-side state, not a static illustration.

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 badge dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/feature-side-heading-custom-tabs.json

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

Usage

The file also exports feature65Demo, 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 { Feature65, feature65Demo } from "@/components/blocks/feature/feature65";

export default function Page() {
  return <Feature65 {...feature65Demo} />;
}

Props

PropTypeDefaultDescription
badgestringundefinedSmall label above the heading.
headingReactNodenoneSection heading, left column.
paragraphsstring[]noneOne or more supporting paragraphs under the heading.
tabsFeature65Tab[]noneTab strip options; the first tab is active by default.
classNamestringnoneExtra classes for the outer section element.

Types

interface Feature65Tab {
  label: string;
  heading: string;
  content: string;
}

Behavior notes

  • The tab strip is real client-side state: clicking a tab updates which panel is shown, with proper role="tablist"/role="tab"/role="tabpanel" and aria-selected/aria-controls wiring.
  • The first tab in the array is selected by default; there is no URL- or prop-driven initial selection.
  • Demo props live in a sibling feature65.demo.tsx (no "use client" directive) since feature65.tsx is a client component, per this repo's client/demo-file split rule.