Skip to Content

AccommodationDetailsSection

Compose accommodation metadata, sleeping arrangements, highlights, media, facilities, and optional actions.

AccommodationDetailsSection presents a single accommodation profile. Its media and facilities are composable React slots, so existing gallery, amenity, and application components can be reused without a second gallery or hero implementation.

Beta API maturity: Beta.

Installation

import {
  AccommodationDetailsSection,
  AmenityListSection,
  GallerySection,
} from "@puzzle-ui/pieces";

Variant previews

The split variant places media beside details at wider widths and stacks on mobile. stacked keeps a single column at every width.

split - Show media beside structured accommodation details.

390 × 844

stacked - Keep media and details in one continuous column.

390 × 844

API

Prop or typeTypeDescription
accommodationAccommodationDetailsRequired profile with a name and optional description, counts, sleeping arrangements, and highlights.
variantAccommodationDetailsVariantsplit (default) or stacked.
mediaReactNodeOptional photo or media slot. Use the existing GallerySection when a gallery is needed.
facilitiesReactNodeOptional facilities slot. Use AmenityListSection rather than duplicating amenity rendering.
AccommodationDetails.capacity, bedrooms, beds, bathroomsnumberOptional non-negative safe-integer counts.
AccommodationDetails.sleepingArrangementsreadonly AccommodationSleepingArrangement[]Optional rooms with stable IDs, names, and bed descriptions.
AccommodationDetails.highlightsreadonly AccommodationFeature[]Optional highlights with labels and optional icon/description.
Shared section propsMarketingSectionBasePropstitle and description default to the accommodation name and description; includes actions, children, and native section props.

Required and default values

PropRequiredDefault
accommodationYes—
accommodation.nameYes—
variantNo"split"
mediaNo—
facilitiesNo—

TypeScript example

const amenities: AmenityCategory[] = [
  {
    id: "comfort",
    name: "Comfort",
    items: [{ id: "wifi", label: "High-speed Wi-Fi" }],
  },
];

<AccommodationDetailsSection
  accommodation={{
    name: "Willow House",
    description: "A family home beside the river.",
    capacity: 6,
    bedrooms: 3,
    beds: 5,
    bathrooms: 2,
    sleepingArrangements: [
      { id: "main", name: "Main bedroom", description: "One king bed" },
    ],
  }}
  media={<GallerySection items={images} variant="bento" lightbox />}
  facilities={
    <AmenityListSection title="Facilities" categories={amenities} />
  }
  actions={<Button href="/contact">Ask about this stay</Button>}
/>;

Counts are validated as non-negative safe integers; sleeping arrangement IDs and highlight IDs must be unique. Use children for additional content that belongs to the section. The component does not fetch media, availability, or booking data.

Accessibility

The section uses the shared semantic section heading and definition-list metadata. Sleeping arrangements are a list, and highlights retain visible labels even when icons are supplied. Choose meaningful image alternatives in the media slot and keep heading levels logical when composing nested sections.

Responsive behavior

split becomes two flexible columns at 48rem; below that it stacks without fixed heights. stacked remains one column. Each slot is constrained to its available width so a gallery, video, or caller-provided content can shrink. Use the viewport selector to check 320–1920px widths and intermediate sizes.

Theme support

Details and shared metadata use Puzzle semantic tokens and inherit the active root or scoped theme. Nested Pieces components consume the same theme.

Customization

Use media, facilities, actions, children, and className to compose application-specific content. Existing GallerySection and AmenityListSection remain responsible for their own interactions and presentation.

<AccommodationDetailsSection
  accommodation={stay}
  media={<GallerySection items={images} variant="grid" />}
  facilities={<AmenityListSection categories={amenities} collapsible />}
  className="brand-stay-details"
>
  <BookingPolicy />
</AccommodationDetailsSection>

Composition

This section is designed to accompany AccommodationOverviewSection, AmenityListSection, the existing AccommodationHero, and GallerySection.

390 × 844

Framework compatibility

The section is router-independent and has no browser-only state. It can be server-rendered in Next.js and TanStack Start; callback-driven controls supplied through actions or children should follow the framework's client-boundary rules.