Screen mockup 02
A heading, two buttons and customer logos beside a screenshot, on a tint with a dot grid.
Last updated
---
/**
* Screen mockup 02: A heading, two buttons and customer logos beside a screenshot, on a tint with a dot grid.
*
* @block hero
* @order 14
*/
import { Atom, CirclePlay, Hexagon, Mountain, Sprout, Waves, Wind } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import Container from '@/components/apogee/Container/Container.astro'
import Heading from '@/components/apogee/Heading/Heading.astro'
import Button from '@/components/apogee/Button/Button.astro'
import DeviceFrame from '@/components/apogee/DeviceFrame/DeviceFrame.astro'
import { plain, type HeroContent, type Media } from '@/components/apogee/sections/_shared/spine.ts'
const logos = [
{ name: 'Lumen', icon: Hexagon },
{ name: 'Quanta', icon: Atom },
{ name: 'Fieldwork', icon: Sprout },
{ name: 'Northpeak', icon: Mountain },
{ name: 'Arcwave', icon: Waves },
{ name: 'Kitestring', icon: Wind },
]
/** @composable */
interface Props extends HeroContent {
/** The line above the customer logos. @category content */
trustedBy?: string | null
/** The screenshot; `srcDark` swaps in when the page is dark. @category content */
media?: Media | null
}
const {
heading = 'Beautiful analytics to grow smarter',
description = 'Powerful, self-serve product and growth analytics to help you convert, engage and retain more users. Trusted by over 4,000 startups.',
primaryAction = { label: 'Sign up', href: '#' },
secondaryAction = { label: 'Demo', href: '#' },
trustedBy = 'Trusted by 4,000+ companies',
media = { src: '/mockups/app-customers-desktop-light.jpg', srcDark: '/mockups/app-customers-desktop-dark.jpg', alt: 'The customers table in a browser' },
} = Astro.props
---
<Section spacing="large" container={false} background="neutral-faded" class="overflow-hidden">
<div class="pointer-events-none absolute inset-0 mask-[radial-gradient(ellipse_at_top,black,transparent_70%)] bg-[radial-gradient(var(--border-neutral)_1px,transparent_1px)] bg-size-[1.5rem_1.5rem]" aria-hidden="true"></div>
<Container class="relative">
<div class="grid items-center gap-12 lg:gap-16 lg:grid-cols-2">
<div class="flex flex-col gap-8 md:gap-12">
<div class="flex flex-col gap-4 md:gap-6 items-start">
<Heading as="h1" size="display" class="text-balance">{plain(heading)}</Heading>
{description && <p class="max-w-2xl text-lg md:text-xl text-neutral-faded">{description}</p>}
</div>
{(primaryAction || secondaryAction) && (
<div class="flex flex-col-reverse gap-3 sm:flex-row ">
{secondaryAction && <Button href={secondaryAction.href} size="large" variant="outline" color="neutral"><CirclePlay slot="start" aria-hidden="true" />{secondaryAction.label}</Button>}
{primaryAction && <Button href={primaryAction.href} size="large">{primaryAction.label}</Button>}
</div>
)}
<div class="flex flex-col gap-4">
{trustedBy && <p class="text-sm font-medium text-neutral-faded">{trustedBy}</p>}
<ul class="flex list-none flex-wrap items-center gap-x-8 gap-y-4 p-0" aria-label="Customers">
{logos.map((l) => <li class="flex items-center gap-2 text-lg font-semibold text-neutral-faded"><l.icon class="size-6" aria-hidden="true" />{l.name}</li>)}
</ul>
</div>
</div>
{media && <DeviceFrame device="browser" src={media.src} srcDark={media.srcDark} alt={media.alt} width={media.width} height={media.height} class="" />}
</div>
</Container>
</Section>
Show codeHide code
---
/**
* Screen mockup 02: A heading, two buttons and customer logos beside a screenshot, on a tint with a dot grid.
*
* @block hero
* @order 14
*/
import { Atom, CirclePlay, Hexagon, Mountain, Sprout, Waves, Wind } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import Container from '@/components/apogee/Container/Container.astro'
import Heading from '@/components/apogee/Heading/Heading.astro'
import Button from '@/components/apogee/Button/Button.astro'
import DeviceFrame from '@/components/apogee/DeviceFrame/DeviceFrame.astro'
import { plain, type HeroContent, type Media } from '@/components/apogee/sections/_shared/spine.ts'
const logos = [
{ name: 'Lumen', icon: Hexagon },
{ name: 'Quanta', icon: Atom },
{ name: 'Fieldwork', icon: Sprout },
{ name: 'Northpeak', icon: Mountain },
{ name: 'Arcwave', icon: Waves },
{ name: 'Kitestring', icon: Wind },
]
/** @composable */
interface Props extends HeroContent {
/** The line above the customer logos. @category content */
trustedBy?: string | null
/** The screenshot; `srcDark` swaps in when the page is dark. @category content */
media?: Media | null
}
const {
heading = 'Beautiful analytics to grow smarter',
description = 'Powerful, self-serve product and growth analytics to help you convert, engage and retain more users. Trusted by over 4,000 startups.',
primaryAction = { label: 'Sign up', href: '#' },
secondaryAction = { label: 'Demo', href: '#' },
trustedBy = 'Trusted by 4,000+ companies',
media = { src: '/mockups/app-customers-desktop-light.jpg', srcDark: '/mockups/app-customers-desktop-dark.jpg', alt: 'The customers table in a browser' },
} = Astro.props
---
<Section spacing="large" container={false} background="neutral-faded" class="overflow-hidden">
<div class="pointer-events-none absolute inset-0 mask-[radial-gradient(ellipse_at_top,black,transparent_70%)] bg-[radial-gradient(var(--border-neutral)_1px,transparent_1px)] bg-size-[1.5rem_1.5rem]" aria-hidden="true"></div>
<Container class="relative">
<div class="grid items-center gap-12 lg:gap-16 lg:grid-cols-2">
<div class="flex flex-col gap-8 md:gap-12">
<div class="flex flex-col gap-4 md:gap-6 items-start">
<Heading as="h1" size="display" class="text-balance">{plain(heading)}</Heading>
{description && <p class="max-w-2xl text-lg md:text-xl text-neutral-faded">{description}</p>}
</div>
{(primaryAction || secondaryAction) && (
<div class="flex flex-col-reverse gap-3 sm:flex-row ">
{secondaryAction && <Button href={secondaryAction.href} size="large" variant="outline" color="neutral"><CirclePlay slot="start" aria-hidden="true" />{secondaryAction.label}</Button>}
{primaryAction && <Button href={primaryAction.href} size="large">{primaryAction.label}</Button>}
</div>
)}
<div class="flex flex-col gap-4">
{trustedBy && <p class="text-sm font-medium text-neutral-faded">{trustedBy}</p>}
<ul class="flex list-none flex-wrap items-center gap-x-8 gap-y-4 p-0" aria-label="Customers">
{logos.map((l) => <li class="flex items-center gap-2 text-lg font-semibold text-neutral-faded"><l.icon class="size-6" aria-hidden="true" />{l.name}</li>)}
</ul>
</div>
</div>
{media && <DeviceFrame device="browser" src={media.src} srcDark={media.srcDark} alt={media.alt} width={media.width} height={media.height} class="" />}
</div>
</Container>
</Section>Add
npx @ava-ui/apogee add hero/screen-mockup-02
This copies the block to src/components/apogee/blocks/hero/ with everything it uses: Button, Container, DeviceFrame, Heading, Section. 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 the page’s
h1; the items below are one level down.
Related
SectionA full-width band with vertical rhythm and an optional Container, used to lay out page content.
HeadingA semantic, fluid-sized heading — pick the tag with `as`, the visual size with `size`.
ButtonTriggers an action. Renders a <button>, or an <a> when href is set. Hue, fill and height are three separate props.
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.