Space between tabs brand
A split heading, line and a billing switch on the brand colour.
Last updated
---
/**
* Space between tabs brand: A split heading, line and a billing switch on the brand colour.
*
* @block header
* @order 30
*/
import Section from '@/components/apogee/Section/Section.astro'
import Eyebrow from '@/components/apogee/Eyebrow/Eyebrow.astro'
import Heading from '@/components/apogee/Heading/Heading.astro'
import Text from '@/components/apogee/Text/Text.astro'
import SegmentedControl from '@/components/apogee/SegmentedControl/SegmentedControl.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { PageHeaderContent } from '@/components/apogee/sections/_shared/header.ts'
/** @composable */
interface Props extends PageHeaderContent {}
const { eyebrow = 'Pricing', heading = 'Simple, transparent pricing', description = 'Simple, transparent pricing that grows with you. Try any plan free for 30 days.' } = Astro.props
---
<Section spacing="large" background="primary">
{eyebrow && <Eyebrow as="p" color="inherit">{eyebrow}</Eyebrow>}
<div class="mt-3 grid gap-4 md:gap-6 lg:grid-cols-[minmax(0,1fr)_30rem] lg:gap-x-16">
<Heading as="h1" size="display" class="text-balance">{plain(heading)}</Heading>
{description && <Text size="large" class="opacity-85 lg:mt-3">{description}</Text>}
</div>
<div class="mt-8">
<SegmentedControl name="billing" options={[{ label: 'Monthly billing', value: 'monthly' }, { label: 'Annual billing', value: 'annual' }]} value="monthly" aria-label="Billing period" size="large" class="bg-page" />
</div>
</Section>
Show codeHide code
---
/**
* Space between tabs brand: A split heading, line and a billing switch on the brand colour.
*
* @block header
* @order 30
*/
import Section from '@/components/apogee/Section/Section.astro'
import Eyebrow from '@/components/apogee/Eyebrow/Eyebrow.astro'
import Heading from '@/components/apogee/Heading/Heading.astro'
import Text from '@/components/apogee/Text/Text.astro'
import SegmentedControl from '@/components/apogee/SegmentedControl/SegmentedControl.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { PageHeaderContent } from '@/components/apogee/sections/_shared/header.ts'
/** @composable */
interface Props extends PageHeaderContent {}
const { eyebrow = 'Pricing', heading = 'Simple, transparent pricing', description = 'Simple, transparent pricing that grows with you. Try any plan free for 30 days.' } = Astro.props
---
<Section spacing="large" background="primary">
{eyebrow && <Eyebrow as="p" color="inherit">{eyebrow}</Eyebrow>}
<div class="mt-3 grid gap-4 md:gap-6 lg:grid-cols-[minmax(0,1fr)_30rem] lg:gap-x-16">
<Heading as="h1" size="display" class="text-balance">{plain(heading)}</Heading>
{description && <Text size="large" class="opacity-85 lg:mt-3">{description}</Text>}
</div>
<div class="mt-8">
<SegmentedControl name="billing" options={[{ label: 'Monthly billing', value: 'monthly' }, { label: 'Annual billing', value: 'annual' }]} value="monthly" aria-label="Billing period" size="large" class="bg-page" />
</div>
</Section>Add
npx @ava-ui/apogee add header/space-between-tabs-brand
This copies the block to src/components/apogee/blocks/header/ with everything it uses: Eyebrow, Heading, Section, SegmentedControl, Text. 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
SectionHeaderEyebrow, heading and description at the top of a section or an app page, with actions, a divider and the level, alignment and colours every section shares.
EyebrowA small label above a heading, for section tags and category kickers.
SegmentedControlA row of connected, mutually exclusive options backed by native radios — pick one from a small, always-visible set.