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.
cards - Give each service a distinct card.
list - Make a longer service catalogue easy to scan.
split - Use two columns for a shorter service menu.
alternating - Alternate media and service descriptions.
featured - Give a primary service more space.
icons - Emphasize the service icon and concise summary.
numbered - Present services as a numbered sequence.
pricing - Include pricing content beside each service.
editorial - Use a lighter, image-forward presentation.
categorized - Group services under their categories.
carousel - Browse service cards in a scrollable rail.
API
| Prop | Type | Description |
|---|---|---|
variant | ServicesSectionVariant | grid (default), cards, list, split, alternating, featured, icons, numbered, pricing, editorial, categorized, or carousel. |
items | readonly BusinessService[] | Services with unique IDs and titles; optional description, icon, image, pricing content, category, native link, consumer-provided CTA, and featured state. |
featuredService | BusinessService | string | Optional service object or ID promoted in the featured layouts. |
BusinessService.pricing | ReactNode | Consumer-provided pricing or package content; no billing behavior is included. |
| Shared section props | MarketingSectionBaseProps | Heading, 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.
| Prop | Required | Default |
|---|---|---|
variant | No | "grid" |
items | Yes | — |
featuredService | No | — |
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.