Tabs mockup 04
A heading over a phone on an arch with notifications beside it, with feature tabs under it that switch what it shows.
Last updated
---
/**
* Tabs mockup 04: A heading over a phone on an arch with notifications beside it, with feature tabs under it that switch what it shows.
*
* @block features
* @order 30
*/
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import DeviceFrame from '@/components/apogee/DeviceFrame/DeviceFrame.astro'
import Badge from '@/components/apogee/Badge/Badge.astro'
import Tabs from '@/components/apogee/Tabs/Tabs.astro'
import Avatar from '@/components/apogee/Avatar/Avatar.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { FeaturesContent } from '@/components/apogee/sections/_shared/features.ts'
/** @composable */
interface Props extends FeaturesContent {}
const {
eyebrow = 'Features',
heading = 'Cutting-edge features for advanced analytics',
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: 'Track what matters', description: 'Revenue, active users, churn and open tickets on one screen.' },
{ title: 'Know your customers', description: 'Every account with its plan, seats and status, searchable and sortable.' },
{ title: 'Set it up your way', description: 'Profile, language and notifications, saved in one place.' },
],
} = Astro.props
---
<Section spacing="large">
<div class="flex flex-col gap-4 items-center mb-12 md:mb-16">
{eyebrow && <Badge color="primary" variant="faded" rounded>{eyebrow}</Badge>}
<SectionHeader heading={plain(heading)} description={description ?? undefined} align="center" />
</div>
<Tabs variant="feature" tabs={items.map((f) => ({ label: f.title, description: f.description }))} label="Features" class="flex flex-col-reverse gap-12 md:gap-16 ">
<div slot="panel-0" class="flex justify-center"><div class="flex items-end justify-center gap-10">
<ul class="flex list-none flex-col gap-3 p-0 max-lg:hidden" aria-hidden="true">
{[['Ada Lovelace', '2 min ago'], ['Alan Turing', '8 min ago'], ['Grace Hopper', '1 hr ago']].map(([n, t]) => (
<li class="flex w-72 items-center gap-3 rounded-xl bg-elevation-raised p-3 shadow-raised ring-1 ring-neutral">
<Avatar name={n} size="small" />
<span class="flex flex-col text-sm"><span><span class="font-semibold">{n}</span> followed you</span><span class="text-neutral-faded">{t}</span></span>
</li>
))}
</ul>
<div class="flex justify-center rounded-t-full bg-neutral-faded px-8 pt-16 md:px-16 md:pt-24"><DeviceFrame device="phone" src="/mockups/app-phone-light.jpg" srcDark="/mockups/app-phone-dark.jpg" alt="The dashboard overview on a phone" class="w-56 md:w-64" /></div>
</div></div>
<div slot="panel-1" class="flex justify-center"><div class="flex items-end justify-center gap-10">
<ul class="flex list-none flex-col gap-3 p-0 max-lg:hidden" aria-hidden="true">
{[['Ada Lovelace', '2 min ago'], ['Alan Turing', '8 min ago'], ['Grace Hopper', '1 hr ago']].map(([n, t]) => (
<li class="flex w-72 items-center gap-3 rounded-xl bg-elevation-raised p-3 shadow-raised ring-1 ring-neutral">
<Avatar name={n} size="small" />
<span class="flex flex-col text-sm"><span><span class="font-semibold">{n}</span> followed you</span><span class="text-neutral-faded">{t}</span></span>
</li>
))}
</ul>
<div class="flex justify-center rounded-t-full bg-neutral-faded px-8 pt-16 md:px-16 md:pt-24"><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-56 md:w-64" /></div>
</div></div>
<div slot="panel-2" class="flex justify-center"><div class="flex items-end justify-center gap-10">
<ul class="flex list-none flex-col gap-3 p-0 max-lg:hidden" aria-hidden="true">
{[['Ada Lovelace', '2 min ago'], ['Alan Turing', '8 min ago'], ['Grace Hopper', '1 hr ago']].map(([n, t]) => (
<li class="flex w-72 items-center gap-3 rounded-xl bg-elevation-raised p-3 shadow-raised ring-1 ring-neutral">
<Avatar name={n} size="small" />
<span class="flex flex-col text-sm"><span><span class="font-semibold">{n}</span> followed you</span><span class="text-neutral-faded">{t}</span></span>
</li>
))}
</ul>
<div class="flex justify-center rounded-t-full bg-neutral-faded px-8 pt-16 md:px-16 md:pt-24"><DeviceFrame device="phone" src="/mockups/app-settings-phone-light.jpg" srcDark="/mockups/app-settings-phone-dark.jpg" alt="The settings page on a phone" class="w-56 md:w-64" /></div>
</div></div>
</Tabs>
</Section>
Show codeHide code
---
/**
* Tabs mockup 04: A heading over a phone on an arch with notifications beside it, with feature tabs under it that switch what it shows.
*
* @block features
* @order 30
*/
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import DeviceFrame from '@/components/apogee/DeviceFrame/DeviceFrame.astro'
import Badge from '@/components/apogee/Badge/Badge.astro'
import Tabs from '@/components/apogee/Tabs/Tabs.astro'
import Avatar from '@/components/apogee/Avatar/Avatar.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { FeaturesContent } from '@/components/apogee/sections/_shared/features.ts'
/** @composable */
interface Props extends FeaturesContent {}
const {
eyebrow = 'Features',
heading = 'Cutting-edge features for advanced analytics',
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: 'Track what matters', description: 'Revenue, active users, churn and open tickets on one screen.' },
{ title: 'Know your customers', description: 'Every account with its plan, seats and status, searchable and sortable.' },
{ title: 'Set it up your way', description: 'Profile, language and notifications, saved in one place.' },
],
} = Astro.props
---
<Section spacing="large">
<div class="flex flex-col gap-4 items-center mb-12 md:mb-16">
{eyebrow && <Badge color="primary" variant="faded" rounded>{eyebrow}</Badge>}
<SectionHeader heading={plain(heading)} description={description ?? undefined} align="center" />
</div>
<Tabs variant="feature" tabs={items.map((f) => ({ label: f.title, description: f.description }))} label="Features" class="flex flex-col-reverse gap-12 md:gap-16 ">
<div slot="panel-0" class="flex justify-center"><div class="flex items-end justify-center gap-10">
<ul class="flex list-none flex-col gap-3 p-0 max-lg:hidden" aria-hidden="true">
{[['Ada Lovelace', '2 min ago'], ['Alan Turing', '8 min ago'], ['Grace Hopper', '1 hr ago']].map(([n, t]) => (
<li class="flex w-72 items-center gap-3 rounded-xl bg-elevation-raised p-3 shadow-raised ring-1 ring-neutral">
<Avatar name={n} size="small" />
<span class="flex flex-col text-sm"><span><span class="font-semibold">{n}</span> followed you</span><span class="text-neutral-faded">{t}</span></span>
</li>
))}
</ul>
<div class="flex justify-center rounded-t-full bg-neutral-faded px-8 pt-16 md:px-16 md:pt-24"><DeviceFrame device="phone" src="/mockups/app-phone-light.jpg" srcDark="/mockups/app-phone-dark.jpg" alt="The dashboard overview on a phone" class="w-56 md:w-64" /></div>
</div></div>
<div slot="panel-1" class="flex justify-center"><div class="flex items-end justify-center gap-10">
<ul class="flex list-none flex-col gap-3 p-0 max-lg:hidden" aria-hidden="true">
{[['Ada Lovelace', '2 min ago'], ['Alan Turing', '8 min ago'], ['Grace Hopper', '1 hr ago']].map(([n, t]) => (
<li class="flex w-72 items-center gap-3 rounded-xl bg-elevation-raised p-3 shadow-raised ring-1 ring-neutral">
<Avatar name={n} size="small" />
<span class="flex flex-col text-sm"><span><span class="font-semibold">{n}</span> followed you</span><span class="text-neutral-faded">{t}</span></span>
</li>
))}
</ul>
<div class="flex justify-center rounded-t-full bg-neutral-faded px-8 pt-16 md:px-16 md:pt-24"><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-56 md:w-64" /></div>
</div></div>
<div slot="panel-2" class="flex justify-center"><div class="flex items-end justify-center gap-10">
<ul class="flex list-none flex-col gap-3 p-0 max-lg:hidden" aria-hidden="true">
{[['Ada Lovelace', '2 min ago'], ['Alan Turing', '8 min ago'], ['Grace Hopper', '1 hr ago']].map(([n, t]) => (
<li class="flex w-72 items-center gap-3 rounded-xl bg-elevation-raised p-3 shadow-raised ring-1 ring-neutral">
<Avatar name={n} size="small" />
<span class="flex flex-col text-sm"><span><span class="font-semibold">{n}</span> followed you</span><span class="text-neutral-faded">{t}</span></span>
</li>
))}
</ul>
<div class="flex justify-center rounded-t-full bg-neutral-faded px-8 pt-16 md:px-16 md:pt-24"><DeviceFrame device="phone" src="/mockups/app-settings-phone-light.jpg" srcDark="/mockups/app-settings-phone-dark.jpg" alt="The settings page on a phone" class="w-56 md:w-64" /></div>
</div></div>
</Tabs>
</Section>Add
npx @ava-ui/apogee add features/tabs-mockup-04
This copies the block to src/components/apogee/blocks/features/ with everything it uses: Avatar, Badge, DeviceFrame, Section, SectionHeader, Tabs. 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. - The feature tabs are a tab list: arrow keys move between them, each tab is named by its title and described by its line, and without JS every panel shows.
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.