Alternating layout 03
A centred heading over three rows: a screenshot, two phones, and a screenshot with a phone over it.
Last updated
---
/**
* Alternating layout 03: A centred heading over three rows: a screenshot, two phones, and a screenshot with a phone over it.
*
* @block features
* @order 3
*/
import { ChartLine, CircleCheck, MessagesSquare, Zap } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import Heading from '@/components/apogee/Heading/Heading.astro'
import FeaturedIcon from '@/components/apogee/FeaturedIcon/FeaturedIcon.astro'
import DeviceFrame from '@/components/apogee/DeviceFrame/DeviceFrame.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { FeaturesContent, FeatureItem } from '@/components/apogee/sections/_shared/features.ts'
const icons = [MessagesSquare, Zap, ChartLine]
/** @composable */
interface Props extends FeaturesContent {
/** The rows; `bullets` are the checked points under each. The device mockups stay in markup, by row. @category content */
items?: (FeatureItem & { bullets?: string[] })[]
}
const {
eyebrow = 'Features',
heading = 'One workspace on every device',
description = 'Powerful, self-serve product and growth analytics to help you convert, engage and retain more users. Trusted by over 4,000 startups.',
items = [
{ title: 'Share team inboxes', description: 'Whether your team is 2 people or 200, shared inboxes keep everyone on the same page and in the loop.', bullets: ['Leverage automation to move fast', 'Always give customers a human to chat to', 'Automate support and close leads faster'] },
{ title: 'Deliver instant answers', description: 'One place for support, so customers get what they need without waiting on a reply.', bullets: ['Keep customers in the loop with live chat', 'Embed help articles right on your website', 'Customers never leave the page to find an answer'] },
{ title: 'Manage your team with reports', description: 'Measure what matters. Filter, export and drill down on the data in a couple of clicks.', bullets: ['Filter, export and drill down on the data', 'Save, schedule and send reports to your inbox', 'Connect the tools you already use'] },
],
} = Astro.props
---
<Section spacing="large">
<SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} align="center" class="mb-12 md:mb-16" />
<div class="flex flex-col gap-16 md:gap-24">
{items.map((f, i) => { const Icon = icons[i % icons.length]!; return (
<div class="grid items-center gap-10 lg:gap-16 lg:grid-cols-2">
<div class:list={['flex max-w-xl flex-col gap-8', i % 2 === 1 && 'lg:order-last']}>
<div class="flex flex-col items-start gap-4">
<FeaturedIcon theme="light" color="primary" size="large"><Icon /></FeaturedIcon>
<Heading as="h3" size="h4">{f.title}</Heading>
<p class="text-lg text-neutral-faded">{f.description}</p>
</div>
{f.bullets && (
<ul class="flex list-none flex-col gap-4 p-0">
{f.bullets.map((b) => <li class="flex gap-3"><CircleCheck class="size-6 shrink-0 text-primary" aria-hidden="true" /><span class="text-neutral-faded">{b}</span></li>)}
</ul>
)}
</div>
<div class="flex items-center justify-center overflow-hidden rounded-3xl bg-neutral-faded p-6 md:p-10 md:p-12">
{i % 3 === 0 && <DeviceFrame device="browser" src="/mockups/app-desktop-light.jpg" srcDark="/mockups/app-desktop-dark.jpg" alt="The dashboard overview in a browser" class="" />}
{i % 3 === 1 && <div class="flex items-end justify-center gap-6"><DeviceFrame device="phone" src="/mockups/app-phone-light.jpg" srcDark="/mockups/app-phone-dark.jpg" alt="The dashboard overview on a phone" class="w-44 md:w-56" /><DeviceFrame device="phone" src="/mockups/app-customers-phone-light.jpg" srcDark="/mockups/app-customers-phone-dark.jpg" alt="The customers table on a phone" class="w-44 max-md:hidden md:w-56" /></div>}
{i % 3 === 2 && <div class="relative w-full pb-12 md:pb-16"><DeviceFrame device="browser" src="/mockups/app-settings-desktop-light.jpg" srcDark="/mockups/app-settings-desktop-dark.jpg" alt="The settings page in a browser" class="w-[88%]" /><div class="absolute end-0 bottom-0 w-28 md:w-40"><DeviceFrame device="phone" src="/mockups/app-customers-phone-light.jpg" srcDark="/mockups/app-customers-phone-dark.jpg" alt="The customers table on a phone" class="" /></div></div>}
</div>
</div>
)})}
</div>
</Section>
Show codeHide code
---
/**
* Alternating layout 03: A centred heading over three rows: a screenshot, two phones, and a screenshot with a phone over it.
*
* @block features
* @order 3
*/
import { ChartLine, CircleCheck, MessagesSquare, Zap } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import Heading from '@/components/apogee/Heading/Heading.astro'
import FeaturedIcon from '@/components/apogee/FeaturedIcon/FeaturedIcon.astro'
import DeviceFrame from '@/components/apogee/DeviceFrame/DeviceFrame.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { FeaturesContent, FeatureItem } from '@/components/apogee/sections/_shared/features.ts'
const icons = [MessagesSquare, Zap, ChartLine]
/** @composable */
interface Props extends FeaturesContent {
/** The rows; `bullets` are the checked points under each. The device mockups stay in markup, by row. @category content */
items?: (FeatureItem & { bullets?: string[] })[]
}
const {
eyebrow = 'Features',
heading = 'One workspace on every device',
description = 'Powerful, self-serve product and growth analytics to help you convert, engage and retain more users. Trusted by over 4,000 startups.',
items = [
{ title: 'Share team inboxes', description: 'Whether your team is 2 people or 200, shared inboxes keep everyone on the same page and in the loop.', bullets: ['Leverage automation to move fast', 'Always give customers a human to chat to', 'Automate support and close leads faster'] },
{ title: 'Deliver instant answers', description: 'One place for support, so customers get what they need without waiting on a reply.', bullets: ['Keep customers in the loop with live chat', 'Embed help articles right on your website', 'Customers never leave the page to find an answer'] },
{ title: 'Manage your team with reports', description: 'Measure what matters. Filter, export and drill down on the data in a couple of clicks.', bullets: ['Filter, export and drill down on the data', 'Save, schedule and send reports to your inbox', 'Connect the tools you already use'] },
],
} = Astro.props
---
<Section spacing="large">
<SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} align="center" class="mb-12 md:mb-16" />
<div class="flex flex-col gap-16 md:gap-24">
{items.map((f, i) => { const Icon = icons[i % icons.length]!; return (
<div class="grid items-center gap-10 lg:gap-16 lg:grid-cols-2">
<div class:list={['flex max-w-xl flex-col gap-8', i % 2 === 1 && 'lg:order-last']}>
<div class="flex flex-col items-start gap-4">
<FeaturedIcon theme="light" color="primary" size="large"><Icon /></FeaturedIcon>
<Heading as="h3" size="h4">{f.title}</Heading>
<p class="text-lg text-neutral-faded">{f.description}</p>
</div>
{f.bullets && (
<ul class="flex list-none flex-col gap-4 p-0">
{f.bullets.map((b) => <li class="flex gap-3"><CircleCheck class="size-6 shrink-0 text-primary" aria-hidden="true" /><span class="text-neutral-faded">{b}</span></li>)}
</ul>
)}
</div>
<div class="flex items-center justify-center overflow-hidden rounded-3xl bg-neutral-faded p-6 md:p-10 md:p-12">
{i % 3 === 0 && <DeviceFrame device="browser" src="/mockups/app-desktop-light.jpg" srcDark="/mockups/app-desktop-dark.jpg" alt="The dashboard overview in a browser" class="" />}
{i % 3 === 1 && <div class="flex items-end justify-center gap-6"><DeviceFrame device="phone" src="/mockups/app-phone-light.jpg" srcDark="/mockups/app-phone-dark.jpg" alt="The dashboard overview on a phone" class="w-44 md:w-56" /><DeviceFrame device="phone" src="/mockups/app-customers-phone-light.jpg" srcDark="/mockups/app-customers-phone-dark.jpg" alt="The customers table on a phone" class="w-44 max-md:hidden md:w-56" /></div>}
{i % 3 === 2 && <div class="relative w-full pb-12 md:pb-16"><DeviceFrame device="browser" src="/mockups/app-settings-desktop-light.jpg" srcDark="/mockups/app-settings-desktop-dark.jpg" alt="The settings page in a browser" class="w-[88%]" /><div class="absolute end-0 bottom-0 w-28 md:w-40"><DeviceFrame device="phone" src="/mockups/app-customers-phone-light.jpg" srcDark="/mockups/app-customers-phone-dark.jpg" alt="The customers table on a phone" class="" /></div></div>}
</div>
</div>
)})}
</div>
</Section>Add
npx @ava-ui/apogee add features/alternating-layout-03
This copies the block to src/components/apogee/blocks/features/ with everything it uses: DeviceFrame, FeaturedIcon, Heading, 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.
Related
Featured iconAn icon in a tinted tile, the glyph that leads an empty state, an alert, a stat or a feature card.
TabsSwitch between panels of related content in the same space.
DeviceFrameA screenshot in a phone, a landscape tablet or a browser window, drawn in CSS with the theme's colours; it scales as a whole and a dark screenshot swaps in with the theme.