Skip to Content

Service Options

Present categorized hospitality services with supplied included or optional status, price content, and caller-owned actions.

ServiceOptionsSection adapts the existing ServicesSection cards for hospitality services. Status and price are caller-provided presentation data; the component does not calculate or charge for services.

Beta API maturity: Beta.

Installation

import { ServiceOptionsSection, type ServiceOption } from "@puzzle-ui/pieces";

Variant previews

The previews reuse ServicesSection's grid, categorized, and featured layouts. Included and optional status is shown as readable text, not color alone.

grid - Present services as a simple grid.

390 × 844

categorized - Group services by supplied category.

390 × 844

featured - Highlight a recommended service.

390 × 844

API

PropTypeRequiredDefault
servicesreadonly ServiceOption[]Yes—
featuredServiceIdstringNoFirst featured item for the featured variant
variantServicesSectionVariantNo"grid"
includedLabelReactNodeNo"Included"
optionalLabelReactNodeNo"Optional"
Shared section propsMarketingSectionBasePropsNo—

ServiceOption

FieldTypeRequiredDescription
idstringYesStable service identifier.
titlestringYesService name.
descriptionReactNodeNoCaller-provided details.
inclusion"included" | "optional"NoStatus text rendered by the section.
priceReactNodeNoSupplied price text or a caller-rendered price component.
categorystringNoGroup name for the categorized variant.
icon, imageReactNode / EditorialImageNoOptional existing ServiceCard media.
action, hrefReactNode / stringNoCaller-owned action or destination.
externalbooleanNoMarks a supplied service link as external for the existing ServiceCard.
numberReactNodeNoOptional number shown by supported ServicesSection layouts.
featuredbooleanNoMarks a service for featured presentation.

Usage

const services: ServiceOption[] = [
  {
    id: "breakfast",
    title: "Breakfast basket",
    description: "Fresh bread and fruit delivered each morning.",
    inclusion: "included",
    category: "At the house",
  },
  {
    id: "sauna",
    title: "Private sauna",
    inclusion: "optional",
    price: "€24 per session",
    category: "Wellness",
    action: <a href="mailto:host@example.test">Ask about a session</a>,
  },
];

<ServiceOptionsSection title="Stay extras" services={services} variant="categorized" />;

Pass a formatted ReactNode when the application needs locale-aware price display. Pieces does not infer a currency or calculate a price.

Responsive behavior

The cards and categorized layout reuse ServicesSection's fluid responsive grid. Descriptions, prices, badges, and actions wrap without fixed heights.

Accessibility

Included and optional states are exposed as text labels. Use descriptive actions and meaningful alternative text for any supplied image.

Theme support

Service cards and status badges inherit existing Puzzle UI tokens and the active or scoped theme.

Customization

Use shared section props, className, and the service action and price slots to adapt the composition. Existing ServicesSection variants remain available; this wrapper adds no new card system.

Composition

Use ServiceOptionsSection for included or optional hospitality services. Use ServicesSection for general business service descriptions. The Boutique B&B and Restaurant Experience examples show both use cases.

TypeScript example

ServiceOption is exported from the @puzzle-ui/pieces package root.

Framework compatibility

The section is router-independent and server-renderable. Service actions and pricing remain caller-owned. See Next.js and TanStack Start integration.