A left-aligned eyebrow, heading and line.

Last updated

Open block
Show code
---
/**
 * Left: A left-aligned eyebrow, heading and line.
 *
 * @block header
 * @order 11
 */
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.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 = 'About us', heading = 'About the company', description = 'Learn more about the company and the team behind it.' } = Astro.props
---

<Section spacing="large">
  <SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} headingLevel={1} size="large" />
</Section>

Add

npx @ava-ui/apogee add header/left

This copies the block to src/components/apogee/blocks/header/ with everything it uses: 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.
  • Each “Learn more” link names its feature for screen readers.