Skip to Content

ServicesSection

Present consulting, agency, hospitality, or product services with responsive layouts, optional media, pricing, categories, and links.

ServicesSection turns service data into responsive cards, lists, categorized offerings, and horizontal rails. Descriptions, icons, images, pricing content, and links are optional.

Beta API maturity: Beta.

Installation

import {
  ServicesSection,
  type BusinessService,
  type ServicesSectionVariant,
} from "@puzzle-ui/pieces";

Variant previews

All twelve variants have an individual preview. Examples combine SaaS, agency, consultancy, and hospitality services.

grid - Present services in a balanced responsive grid.

390 × 844

cards - Give each service a distinct card.

390 × 844

list - Make a longer service catalogue easy to scan.

390 × 844

split - Use two columns for a shorter service menu.

390 × 844

alternating - Alternate media and service descriptions.

390 × 844

featured - Give a primary service more space.

390 × 844

icons - Emphasize the service icon and concise summary.

390 × 844

numbered - Present services as a numbered sequence.

390 × 844

pricing - Include pricing content beside each service.

390 × 844

editorial - Use a lighter, image-forward presentation.

390 × 844

categorized - Group services under their categories.

390 × 844

carousel - Browse service cards in a scrollable rail.

390 × 844

API

PropTypeDescription
variantServicesSectionVariantgrid (default), cards, list, split, alternating, featured, icons, numbered, pricing, editorial, categorized, or carousel.
itemsreadonly BusinessService[]Services with unique IDs and titles; optional description, icon, image, pricing content, category, native link, consumer-provided CTA, and featured state.
featuredServiceBusinessService | stringOptional service object or ID promoted in the featured layouts.
BusinessService.pricingReactNodeConsumer-provided pricing or package content; no billing behavior is included.
Shared section propsMarketingSectionBasePropsHeading, actions, root element, native section attributes, and children.

Required and default values

Requiredness follows the exported TypeScript type. A dash means no component-level default is applied; variant-specific requirements are described in the API table above.

PropRequiredDefault
variantNo"grid"
itemsYes—
featuredServiceNo—

Usage

<ServicesSection
  variant="categorized"
  title="How we help"
  items={[
    {
      id: "strategy",
      title: "Business strategy",
      description: "Find a clear direction for your next stage.",
      category: "Consulting",
      pricing: "Engagements from $8,000",
      href: "/services/strategy",
    },
    {
      id: "identity",
      title: "Brand identity",
      description: "Build a visual system that grows with your business.",
      category: "Creative",
    },
  ]}
/>

Accessibility and rendering

Service titles and links use semantic headings and native anchors. Decorative icon nodes are hidden from assistive technology; images should have useful alt text when informative. Carousel content stays in a native keyboard-scrollable region and respects reduced-motion defaults. IDs must be unique and stable. The component does not implement checkout or service fulfillment and renders on the server.

Customization

Use the component's className and documented slots to adapt the composition. Prefer a caller-provided ReactNode for media, actions, or controls rather than adding domain behavior to the section.

import type { ComponentProps } from "react";
import { ServicesSection } from "@puzzle-ui/pieces";

type ServicesSectionProps = ComponentProps<typeof ServicesSection>;

export function CustomizedSection(props: ServicesSectionProps) {
  return <ServicesSection {...props} className={[props.className, "brand-section"].filter(Boolean).join(" ")} />;
}

Responsive behavior

Use the preview device selector to review mobile, tablet, and desktop widths. The built-in variant controls section structure; ensure application-provided media, form controls, and children can shrink or wrap without horizontal overflow. Use the existing responsive breakpoints in scoped CSS when the consuming layout needs a product-specific adjustment.

Theme support

The section consumes semantic variables from @puzzle-ui/theme and inherits active or scoped themes. Wrap the application with Theme, and use semantic roles such as text, surface, border, and primary for local overrides. Avoid hard-coded colors, spacing, radii, and shadows.

.brand-section {
  color: var(--puzzle-color-text);
  background: var(--puzzle-color-surface);
  border-color: var(--puzzle-color-border);
}

Composition

Compose this section with the UI primitives named in its API and use the documented slots for consumer-owned controls or media. Keep data fetching, routing, validation, permissions, and persistence in the application. The children slot is intended for additional content that belongs with this section, not as a substitute for its typed data model.

TypeScript example

The package exports this component from its root. Derive a wrapper's exact prop type from the public component rather than widening it:

import type { ComponentProps } from "react";
import { ServicesSection } from "@puzzle-ui/pieces";

type ServicesSectionProps = ComponentProps<typeof ServicesSection>;

export function SectionWrapper(props: ServicesSectionProps) {
  return <ServicesSection {...props} />;
}

Framework compatibility

The section is router-independent. Static compositions can be server-rendered; place callback-driven interactions in the framework's client boundary. See Next.js and TanStack Start integration for runnable framework examples and SSR guidance.