Composite

CaseStudyLayout

The body of a case study page: results above the Markdown, a map below it.

Results and map

results renders as a description list above the body. A location with lat and lon adds a Map after it.

A ring configurator that sells

Example JewellersAmsterdam
Conversion
+38%
Returns
−21%
Time on page
3m 40s

The client wanted shoppers to see the ring they were buying, in every metal and stone.

results-map
---
import CaseStudyLayout from '@alfadormx/blocks/composite/CaseStudyLayout.astro';

const location = {
  name: 'Amsterdam',
  address: 'Keizersgracht 1, 1015 CC Amsterdam',
  lat: 52.3731,
  lon: 4.8892,
  zoom: 14,
};
---

<CaseStudyLayout
  headline={{ title: 'A ring configurator that sells', htmlTag: 'h2' }}
  client="Example Jewellers"
  date={new Date('2026-06-10T12:00:00Z')}
  results={[
    { label: 'Conversion', value: '+38%' },
    { label: 'Returns', value: '−21%' },
    { label: 'Time on page', value: '3m 40s' },
  ]}
  location={location}
>
  <p>The client wanted shoppers to see the ring they were buying, in every metal and stone.</p>
</CaseStudyLayout>

No map

map: false hides the map even when the location has coordinates.

Brand refresh

Example Co.Amsterdam

Semantic colour tokens replaced raw palette values across the site.

no-map
---
import CaseStudyLayout from '@alfadormx/blocks/composite/CaseStudyLayout.astro';

const location = {
  name: 'Amsterdam',
  address: 'Keizersgracht 1, 1015 CC Amsterdam',
  lat: 52.3731,
  lon: 4.8892,
  zoom: 14,
};
---

<CaseStudyLayout
  headline={{ title: 'Brand refresh', htmlTag: 'h2' }}
  client="Example Co."
  date={new Date('2025-11-20T12:00:00Z')}
  location={location}
  map={false}
>
  <p>Semantic colour tokens replaced raw palette values across the site.</p>
</CaseStudyLayout>

gallery renders a ContentCarousel after the body; contentCarousel configures it.

Brand refresh

Example Co.

Semantic colour tokens replaced raw palette values across the site.

gallery
---
import CaseStudyLayout from '@alfadormx/blocks/composite/CaseStudyLayout.astro';
---

<CaseStudyLayout
  headline={{ title: 'Brand refresh', htmlTag: 'h2' }}
  client="Example Co."
  date={new Date('2025-11-20T12:00:00Z')}
  gallery={[
    {
      src: '~/assets/images/demos/portfolio/brand-refresh-1.jpg',
      alt: 'Wireframe sketches in a spiral notebook, next to a phone',
    },
    {
      src: '~/assets/images/demos/portfolio/brand-refresh-2.jpg',
      alt: 'Close-up of hand-drawn wireframes',
    },
    {
      src: '~/assets/images/demos/portfolio/brand-refresh-3.jpg',
      alt: 'A laptop screen showing a grid of images',
    },
  ]}
>
  <p>Semantic colour tokens replaced raw palette values across the site.</p>
</CaseStudyLayout>

API Reference

PropTypeDefaultDescription
headlineHeadlineProps—Entry title (default: htmlTag 'h1').
imageImageProps—Cover image above the title.
tagsstring[]—Tags under the body (default: []).
langCodestring—Language of the layout's dates and UI strings (default: the site's default language).
classstring—Classes on the layout root (`data-entry-layout`).
bodyClassstring—Classes on the Markdown body wrapper (`data-entry-body`), merged after `prose`; use typography modifiers such as `prose-lg` or `max-w-none`.
tagsClassstring—Classes on the tags list (`data-entry-layout-tags`).
clientstring—Client name, first in the meta line.
dateDate—Project date, formatted in the layout language's locale.
results{ label: string; value: string }[][]Headline figures shown above the body, value over label.
locationEntryLocation—Project location; with `lat` and `lon` the layout shows a Map after the body.
mapOmit<MapProps, 'lat' | 'lon'> | false—Map shown when `location` has coordinates; `false` hides it (default: zoom from the location or 13, height '320px').
galleryCarouselItem[][]Images shown as a carousel after the body, before the map; renders only when non-empty.
contentCarouselOmit<ContentCarouselProps, 'items'>—Configuration for the gallery ContentCarousel (default: { ariaLabel: per-language "Project gallery", defaultImageConfig: { widths: [640, 960, 1280], sizes: '(min-width: 768px) 768px, 100vw' } }); other image defaults are ContentCarousel's.
resultsClassstring—Classes on the results list (`data-case-study-results`).