Left buttons brand
A left-aligned heading, line and two buttons on the brand colour.
Last updated
---
/**
* Left buttons brand: A left-aligned heading, line and two buttons on the brand colour.
*
* @block header
* @order 14
*/
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import Button from '@/components/apogee/Button/Button.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 = 'Plans that fit your scale',
description = 'Simple, transparent pricing that grows with you. Try any plan free for 30 days.',
primaryAction = { label: 'Get started', href: '#' },
secondaryAction = { label: 'Chat to sales', href: '#' },
} = Astro.props
---
<Section spacing="large" background="primary">
<div class="flex flex-col gap-8 md:gap-12 items-start">
<SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} headingLevel={1} size="large" background="primary" />
{(primaryAction || secondaryAction) && (
<div class="flex flex-col-reverse gap-3 sm:flex-row">
{secondaryAction && <Button href={secondaryAction.href} size="large" variant="outline" color="neutral" class="border-current! bg-transparent! text-inherit! shadow-none!">{secondaryAction.label}</Button>}
{primaryAction && <Button href={primaryAction.href} size="large" color="neutral">{primaryAction.label}</Button>}
</div>
)}
</div>
</Section>
Show codeHide code
---
/**
* Left buttons brand: A left-aligned heading, line and two buttons on the brand colour.
*
* @block header
* @order 14
*/
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import Button from '@/components/apogee/Button/Button.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 = 'Plans that fit your scale',
description = 'Simple, transparent pricing that grows with you. Try any plan free for 30 days.',
primaryAction = { label: 'Get started', href: '#' },
secondaryAction = { label: 'Chat to sales', href: '#' },
} = Astro.props
---
<Section spacing="large" background="primary">
<div class="flex flex-col gap-8 md:gap-12 items-start">
<SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} headingLevel={1} size="large" background="primary" />
{(primaryAction || secondaryAction) && (
<div class="flex flex-col-reverse gap-3 sm:flex-row">
{secondaryAction && <Button href={secondaryAction.href} size="large" variant="outline" color="neutral" class="border-current! bg-transparent! text-inherit! shadow-none!">{secondaryAction.label}</Button>}
{primaryAction && <Button href={primaryAction.href} size="large" color="neutral">{primaryAction.label}</Button>}
</div>
)}
</div>
</Section>Add
npx @ava-ui/apogee add header/left-buttons-brand
This copies the block to src/components/apogee/blocks/header/ with everything it uses: Button, 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 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.