Icons and image 02
A heading over three features with icons and links beside a photo.
Last updated
---
/**
* Icons and image 02: A heading over three features with icons and links beside a photo.
*
* @block features
* @order 10
*/
import { ArrowRight, 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 Heading from '@/components/apogee/Heading/Heading.astro'
import FeaturedIcon from '@/components/apogee/FeaturedIcon/FeaturedIcon.astro'
import Link from '@/components/apogee/Link/Link.astro'
import Image from '@/components/apogee/Image/Image.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 {}
const {
eyebrow = 'Features',
heading = 'Overflowing with useful features',
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.', href: '#' },
{ title: 'Deliver instant answers', description: 'One place for support, so customers get what they need without waiting on a reply.', href: '#' },
{ title: 'Manage your team with reports', description: 'Measure what matters. Filter, export and drill down on the data in a couple of clicks.', href: '#' },
],
linkLabel = 'Learn more',
media = { src: 'https://picsum.photos/seed/apogee-features-4/1200/1100', alt: '', width: 1200, height: 1100 },
} = Astro.props
---
<Section spacing="large">
<SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} class="mb-12 md:mb-16" />
<div class="grid items-center gap-12 lg:grid-cols-2 lg:gap-16">
<ul class="grid list-none p-0 gap-10 md:grid-cols-2 lg:grid-cols-1 ">
{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>
{f.href && <Link href={f.href} color="primary" underline="none" class="inline-flex items-center gap-1.5 font-semibold">{f.linkLabel ?? linkLabel}<span class="sr-only"> about {f.title}</span><ArrowRight class="size-4 rtl:-scale-x-100" aria-hidden="true" /></Link>}
</div>
</li>
)})}
</ul>
{media && <Image src={media.src} alt={media.alt} width={media.width} height={media.height} fit="cover" radius="xl" class="h-60 w-full md:h-140" />}
</div>
</Section>
Show codeHide code
---
/**
* Icons and image 02: A heading over three features with icons and links beside a photo.
*
* @block features
* @order 10
*/
import { ArrowRight, 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 Heading from '@/components/apogee/Heading/Heading.astro'
import FeaturedIcon from '@/components/apogee/FeaturedIcon/FeaturedIcon.astro'
import Link from '@/components/apogee/Link/Link.astro'
import Image from '@/components/apogee/Image/Image.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 {}
const {
eyebrow = 'Features',
heading = 'Overflowing with useful features',
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.', href: '#' },
{ title: 'Deliver instant answers', description: 'One place for support, so customers get what they need without waiting on a reply.', href: '#' },
{ title: 'Manage your team with reports', description: 'Measure what matters. Filter, export and drill down on the data in a couple of clicks.', href: '#' },
],
linkLabel = 'Learn more',
media = { src: 'https://picsum.photos/seed/apogee-features-4/1200/1100', alt: '', width: 1200, height: 1100 },
} = Astro.props
---
<Section spacing="large">
<SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} class="mb-12 md:mb-16" />
<div class="grid items-center gap-12 lg:grid-cols-2 lg:gap-16">
<ul class="grid list-none p-0 gap-10 md:grid-cols-2 lg:grid-cols-1 ">
{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>
{f.href && <Link href={f.href} color="primary" underline="none" class="inline-flex items-center gap-1.5 font-semibold">{f.linkLabel ?? linkLabel}<span class="sr-only"> about {f.title}</span><ArrowRight class="size-4 rtl:-scale-x-100" aria-hidden="true" /></Link>}
</div>
</li>
)})}
</ul>
{media && <Image src={media.src} alt={media.alt} width={media.width} height={media.height} fit="cover" radius="xl" class="h-60 w-full md:h-140" />}
</div>
</Section>Add
npx @ava-ui/apogee add features/icons-and-image-02
This copies the block to src/components/apogee/blocks/features/ with everything it uses: FeaturedIcon, Heading, Image, Link, 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. - Each integration icon is an image named after the tool.
- Each “Learn more” link names its feature for screen readers.
- Photos that only decorate have an empty
alt; give yours one when it carries meaning.
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.