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.
---
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.
---
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.
---
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
---
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.
---
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.
---
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.
---
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.
---
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
---
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
| Prop | Type | Default | Description |
|---|---|---|---|
| tagline | string | — | Small label shown above the title |
| title | string | — | Main headline text |
| subtitle | string | — | Supporting text shown below the title |
| taglineClass | string | '' | Custom classes for the tagline element |
| titleClass | string | '' | Custom classes for the title element |
| subtitleClass | string | '' | Custom classes for the subtitle element |
| class | string | '' | Custom classes for the root element |
| align | 'left' | 'center' | 'right' | 'left' | Text alignment (default: 'left') |
| anchorId | string | — | 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') |