Split image 01brand
A heading over four figures with a line each, beside a photo, on the brand colour.
Last updated
---
/**
* Split image 01brand: A heading over four figures with a line each, beside a photo, on the brand colour.
*
* @block metrics
* @order 14
*/
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import Image from '@/components/apogee/Image/Image.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { MetricsContent } from '@/components/apogee/sections/_shared/metrics.ts'
/** @composable */
interface Props extends MetricsContent {}
const {
eyebrow = 'Launch faster',
heading = 'Build something great',
description = "Everything you need to build modern interfaces and great products. We've done the heavy lifting, so you can start any project from a solid base.",
items = [
{ value: '400+', label: 'Projects completed', description: "We've helped build over 400 projects with teams of every size." },
{ value: '600%', label: 'Return on investment', description: "Customers report an average return of about 600%." },
{ value: '10k', label: 'Global downloads', description: "Our starter kit has been downloaded over 10k times." },
{ value: '200+', label: 'Five-star reviews', description: "We're proud of a five-star rating across 200+ reviews." },
],
media = { src: 'https://picsum.photos/seed/apogee-metrics-4/1200/1100', alt: '', width: 1200, height: 1100 },
} = Astro.props
---
<Section spacing="large" background="primary">
<div class="flex flex-col gap-12 md:gap-16">
<SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} size="large" background="primary" />
<div class="grid gap-12 lg:grid-cols-2 lg:gap-16">
<dl class="grid gap-8 self-center md:grid-cols-2 md:gap-y-16">
{items.map((s) => (
<div class="flex flex-col gap-3 items-center text-center">
<dt class="order-2 text-lg font-semibold">{s.label}</dt>
<dd class="order-1 text-5xl font-semibold tracking-tight tabular-nums md:text-6xl ">{s.value}</dd>
{s.description && <dd class="order-3 opacity-85">{s.description}</dd>}
</div>
))}
</dl>
{media && <Image src={media.src} alt={media.alt} width={media.width} height={media.height} fit="cover" radius="xl" class="h-70 w-full md:h-140" />}
</div>
</div>
</Section>
Show codeHide code
---
/**
* Split image 01brand: A heading over four figures with a line each, beside a photo, on the brand colour.
*
* @block metrics
* @order 14
*/
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import Image from '@/components/apogee/Image/Image.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { MetricsContent } from '@/components/apogee/sections/_shared/metrics.ts'
/** @composable */
interface Props extends MetricsContent {}
const {
eyebrow = 'Launch faster',
heading = 'Build something great',
description = "Everything you need to build modern interfaces and great products. We've done the heavy lifting, so you can start any project from a solid base.",
items = [
{ value: '400+', label: 'Projects completed', description: "We've helped build over 400 projects with teams of every size." },
{ value: '600%', label: 'Return on investment', description: "Customers report an average return of about 600%." },
{ value: '10k', label: 'Global downloads', description: "Our starter kit has been downloaded over 10k times." },
{ value: '200+', label: 'Five-star reviews', description: "We're proud of a five-star rating across 200+ reviews." },
],
media = { src: 'https://picsum.photos/seed/apogee-metrics-4/1200/1100', alt: '', width: 1200, height: 1100 },
} = Astro.props
---
<Section spacing="large" background="primary">
<div class="flex flex-col gap-12 md:gap-16">
<SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} size="large" background="primary" />
<div class="grid gap-12 lg:grid-cols-2 lg:gap-16">
<dl class="grid gap-8 self-center md:grid-cols-2 md:gap-y-16">
{items.map((s) => (
<div class="flex flex-col gap-3 items-center text-center">
<dt class="order-2 text-lg font-semibold">{s.label}</dt>
<dd class="order-1 text-5xl font-semibold tracking-tight tabular-nums md:text-6xl ">{s.value}</dd>
{s.description && <dd class="order-3 opacity-85">{s.description}</dd>}
</div>
))}
</dl>
{media && <Image src={media.src} alt={media.alt} width={media.width} height={media.height} fit="cover" radius="xl" class="h-70 w-full md:h-140" />}
</div>
</div>
</Section>Add
npx @ava-ui/apogee add metrics/split-image-01-brand
This copies the block to src/components/apogee/blocks/metrics/ with everything it uses: Image, Section, SectionHeader. Every piece of copy is a prop, with the sample copy as its default. Pass yours, or null to hide a part; see copy is props.
Accessibility
- The heading is an
h2by default, so the block slots into a page under itsh1; item titles are one level down. - Photos that only decorate have an empty
alt; give yours one when it carries meaning.
Related
SectionHeaderEyebrow, heading and description at the top of a section or an app page, with actions, a divider and the level, alignment and colours every section shares.
Featured iconAn icon in a tinted tile, the glyph that leads an empty state, an alert, a stat or a feature card.
StatsHeadline numbers in a row or as cards.