A heading and two features on a tinted band, over a video that overlaps it.

Last updated

Open block
Show code
---
/**
 * Icons and image 03: A heading and two features on a tinted band, over a video that overlaps it.
 *
 * @block features
 * @order 11
 */
import { ChartLine, Command, MessageCircle, MessageCircleHeart, MessagesSquare, Zap } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import Container from '@/components/apogee/Container/Container.astro'
import Heading from '@/components/apogee/Heading/Heading.astro'
import FeaturedIcon from '@/components/apogee/FeaturedIcon/FeaturedIcon.astro'
import VideoPlayer from '@/components/apogee/VideoPlayer/VideoPlayer.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { FeaturesContent } from '@/components/apogee/sections/_shared/features.ts'

const icons = [MessagesSquare, Zap, ChartLine, MessageCircle, Command, MessageCircleHeart]

/** @composable */
interface Props extends FeaturesContent {
  /** The tour video under the features. @category content */
  video?: { src: string; poster: string; captions: string; title: string } | null
}

const {
  eyebrow = 'New feature',
  heading = 'Introducing team inboxes',
  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.' },
    { title: 'Deliver instant answers', description: 'One place for support, so customers get what they need without waiting on a reply.' },
  ],
  video = { src: '/media/app-tour.mp4', poster: '/mockups/app-desktop-light.jpg', captions: '/media/app-tour.vtt', title: 'A tour of the dashboard' },
} = Astro.props
---

<Section spacing="none" container={false}>
  <div class="bg-neutral-faded pt-section-lg pb-24 md:pb-40">
    <Container class="grid gap-12 lg:grid-cols-2 lg:gap-16">
      <SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} />
      <ul class="grid list-none p-0 gap-10  ">
    {items.map((f, i) => { const Icon = icons[i % icons.length]!; return (
      <li class="flex items-start gap-4">
        <FeaturedIcon theme="outline" color="neutral" size="large"><Icon /></FeaturedIcon>
          <div class="flex flex-col items-start gap-4">
          <div class="flex flex-col gap-2">
            <Heading as="h3" size="h6">{f.title}</Heading>
            <p class="text-neutral-faded">{f.description}</p>
          </div>
          </div>
      </li>
    )})}
  </ul>
    </Container>
  </div>
  <Container class="-mt-16 pb-section-lg md:-mt-24">
    {video && <VideoPlayer src={video.src} poster={video.poster} captions={video.captions} title={video.title} ratio="16/10" class="mx-auto max-w-5xl" />}
  </Container>
</Section>

Add

npx @ava-ui/apogee add features/icons-and-image-03

This copies the block to src/components/apogee/blocks/features/ with everything it uses: Container, FeaturedIcon, Heading, Section, SectionHeader, VideoPlayer. 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 h2 by default, so the block slots into a page under its h1; item titles are one level down.
  • The play button is named after the video; once it plays, the browser’s own controls take over. The video has captions.
  • Each integration icon is an image named after the tool.