Screen mockup 01
A heading, three checks and two buttons beside the app in a browser window.
Last updated
---
/**
* Screen mockup 01: A heading, three checks and two buttons beside the app in a browser window.
*
* @block cta
* @order 17
*/
import { Check } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import Button from '@/components/apogee/Button/Button.astro'
import DeviceFrame from '@/components/apogee/DeviceFrame/DeviceFrame.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { CTAContent } from '@/components/apogee/sections/_shared/cta.ts'
/** @composable */
interface Props extends CTAContent {
/** The checked lines under the description. @category content */
features?: string[] | null
}
const {
eyebrow,
heading = 'Join 4,000+ startups growing with us',
description = 'Start your 30-day free trial today.',
primaryAction = { label: 'Get started', href: '#' },
secondaryAction = { label: 'Learn more', href: '#' },
media = { src: '/mockups/app-desktop-light.jpg', srcDark: '/mockups/app-desktop-dark.jpg', alt: 'The dashboard in a browser' },
features = ['30-day free trial', 'Personalised onboarding', 'Access to all features'],
} = Astro.props
---
<Section spacing="large" class="overflow-hidden">
<div class="grid items-center gap-12 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.4fr)] lg:gap-16">
<div class="flex flex-col gap-8">
<SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} />
{features && (
<ul class="flex list-none flex-col gap-4 p-0">
{features.map((c) => (
<li class="flex items-center gap-3"><span class="grid size-7 shrink-0 place-items-center rounded-full bg-positive-faded text-positive"><Check class="size-4" aria-hidden="true" /></span>{c}</li>
))}
</ul>
)}
{(primaryAction || secondaryAction) && (
<div class="flex flex-col-reverse gap-3 sm:flex-row ">
{secondaryAction && <Button href={secondaryAction.href} size="large" variant="outline" color="neutral">{secondaryAction.label}</Button>}
{primaryAction && <Button href={primaryAction.href} size="large">{primaryAction.label}</Button>}
</div>
)}
</div>
{media && <DeviceFrame device="browser" src={media.src} srcDark={media.srcDark} alt={media.alt} width={media.width} height={media.height} class="lg:w-[140%]" />}
</div>
</Section>
Show codeHide code
---
/**
* Screen mockup 01: A heading, three checks and two buttons beside the app in a browser window.
*
* @block cta
* @order 17
*/
import { Check } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import Button from '@/components/apogee/Button/Button.astro'
import DeviceFrame from '@/components/apogee/DeviceFrame/DeviceFrame.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { CTAContent } from '@/components/apogee/sections/_shared/cta.ts'
/** @composable */
interface Props extends CTAContent {
/** The checked lines under the description. @category content */
features?: string[] | null
}
const {
eyebrow,
heading = 'Join 4,000+ startups growing with us',
description = 'Start your 30-day free trial today.',
primaryAction = { label: 'Get started', href: '#' },
secondaryAction = { label: 'Learn more', href: '#' },
media = { src: '/mockups/app-desktop-light.jpg', srcDark: '/mockups/app-desktop-dark.jpg', alt: 'The dashboard in a browser' },
features = ['30-day free trial', 'Personalised onboarding', 'Access to all features'],
} = Astro.props
---
<Section spacing="large" class="overflow-hidden">
<div class="grid items-center gap-12 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.4fr)] lg:gap-16">
<div class="flex flex-col gap-8">
<SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} />
{features && (
<ul class="flex list-none flex-col gap-4 p-0">
{features.map((c) => (
<li class="flex items-center gap-3"><span class="grid size-7 shrink-0 place-items-center rounded-full bg-positive-faded text-positive"><Check class="size-4" aria-hidden="true" /></span>{c}</li>
))}
</ul>
)}
{(primaryAction || secondaryAction) && (
<div class="flex flex-col-reverse gap-3 sm:flex-row ">
{secondaryAction && <Button href={secondaryAction.href} size="large" variant="outline" color="neutral">{secondaryAction.label}</Button>}
{primaryAction && <Button href={primaryAction.href} size="large">{primaryAction.label}</Button>}
</div>
)}
</div>
{media && <DeviceFrame device="browser" src={media.src} srcDark={media.srcDark} alt={media.alt} width={media.width} height={media.height} class="lg:w-[140%]" />}
</div>
</Section>Add
npx @ava-ui/apogee add cta/screen-mockup-01
This copies the block to src/components/apogee/blocks/cta/ with everything it uses: Button, DeviceFrame, 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
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.
ButtonTriggers an action. Renders a <button>, or an <a> when href is set. Hue, fill and height are three separate props.
CarouselA horizontal scroll-snap track for browsing slides. Native scroll and swipe work with zero JS; arrows, dots, and autoplay are progressive enhancement.