Primitives

Headline

A flexible headline component with tagline, title, and subtitle support.

Complete headline (left aligned)

COMPONENTS

Astro + Tailwind CSS Components

A collection of reusable components for building modern websites with Astro and Tailwind CSS.

complete
---
import Headline from '@alfadormx/blocks/primitives/Headline.astro';
---

<Headline
  tagline="COMPONENTS"
  title="Astro + Tailwind CSS Components"
  subtitle="A collection of reusable components for building modern websites with Astro and Tailwind CSS."
  align="left"
/>

Center aligned

WELCOME

Build Amazing Websites

Create stunning, fast, and accessible web experiences with modern tools and best practices.

center
---
import Headline from '@alfadormx/blocks/primitives/Headline.astro';
---

<Headline
  tagline="WELCOME"
  title="Build Amazing Websites"
  subtitle="Create stunning, fast, and accessible web experiences with modern tools and best practices."
  align="center"
/>

Right aligned

GET STARTED

Ready to Launch?

Everything you need to build and deploy your next project.

right
---
import Headline from '@alfadormx/blocks/primitives/Headline.astro';
---

<Headline
  tagline="GET STARTED"
  title="Ready to Launch?"
  subtitle="Everything you need to build and deploy your next project."
  align="right"
/>

Title only

Simple Headline Without Extras

title-only
---
import Headline from '@alfadormx/blocks/primitives/Headline.astro';
---

<Headline title="Simple Headline Without Extras" />

Title and subtitle (no tagline)

Focus on What Matters

Build products that users love without worrying about the technical details.

title-subtitle
---
import Headline from '@alfadormx/blocks/primitives/Headline.astro';
---

<Headline
  title="Focus on What Matters"
  subtitle="Build products that users love without worrying about the technical details."
/>

Custom styling

PREMIUM

Customized Design

Override default styles with your own classes for complete control.

custom-styling
---
import Headline from '@alfadormx/blocks/primitives/Headline.astro';
---

<Headline
  tagline="PREMIUM"
  title="Customized Design"
  subtitle="Override default styles with your own classes for complete control."
  taglineClass="text-xs font-bold uppercase tracking-widest text-primary"
  titleClass="text-5xl md:text-6xl font-extrabold text-transparent bg-clip-text bg-linear-to-r from-primary to-accent"
  subtitleClass="text-xl mt-6 max-w-2xl"
  align="center"
/>

Dark background

INNOVATION

Built for the Future

Next-generation tools for next-generation developers.

dark-background
---
import Headline from '@alfadormx/blocks/primitives/Headline.astro';
---

<div data-theme="dark" class="rounded-lg bg-base p-8">
  <Headline
    tagline="INNOVATION"
    title="Built for the Future"
    subtitle="Next-generation tools for next-generation developers."
    taglineClass="text-sm font-semibold uppercase tracking-wider text-peach"
    titleClass="text-4xl md:text-5xl font-bold text-text mt-2"
    subtitleClass="text-lg text-subtext1 mt-4 max-w-3xl"
    align="center"
  />
</div>

Compact version

NEW

Quick Announcement

Short and sweet message for your users.

compact
---
import Headline from '@alfadormx/blocks/primitives/Headline.astro';
---

<Headline
  tagline="NEW"
  title="Quick Announcement"
  subtitle="Short and sweet message for your users."
  taglineClass="text-xs font-bold uppercase text-success"
  titleClass="text-2xl font-bold text-emphasis"
  subtitleClass="text-base text-muted mt-2"
/>

Heading level

htmlTag picks the title element and leaves its size alone. Use 'h1' only for the page’s main heading; resize with titleClass.

Rendered as an h3

Same size as every other Headline.

Smaller h3

heading-level
---
import Headline from '@alfadormx/blocks/primitives/Headline.astro';
---

<div class="flex flex-col gap-6">
  <Headline htmlTag="h3" title="Rendered as an h3" subtitle="Same size as every other Headline." />
  <Headline htmlTag="h3" title="Smaller h3" titleClass="text-xl" />
</div>

API Reference

PropTypeDefaultDescription
taglinestring—Small label shown above the title
titlestring—Main headline text
subtitlestring—Supporting text shown below the title
taglineClassstring''Custom classes for the tagline element
titleClassstring''Custom classes for the title element
subtitleClassstring''Custom classes for the subtitle element
classstring''Custom classes for the root element
align'left' | 'center' | 'right''left'Text alignment (default: 'left')
anchorIdstring—Optional anchor id for deep-linking to this headline
htmlTag'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6''h2'Heading element for the title; sets semantics only, not size — resize with `titleClass` (default: 'h2')