Composite
Content
A headline, prose body, and image arranged as an editorial section.
Default
The default Content configuration, with one action and a list of items.
Content Block
Formula Blueprint: Fun Meets Functionality!
The template is a free, customizable and production-ready template for Astro 5.0 + Tailwind CSS.
Building on modern foundations
Gain a competitive advantage by incorporating industry leading practices
---
import Content from '@alfadormx/blocks/composite/Content.astro';
---
<Content
container={{
background: {
image:
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?fit=min&auto=format&w=768&h=768',
overlayClass: 'bg-base/60 backdrop-blur-xl',
attachment: 'fixed',
},
}}
headline={{
tagline: 'Content Block',
title: 'Formula Blueprint: Fun Meets Functionality!',
subtitle:
'The template is a free, customizable and production-ready template for Astro 5.0 + Tailwind CSS.',
}}
image={{
src: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=min&auto=format',
alt: 'Demo image',
}}
action={{
label: 'Get the template',
icon: { name: 'heroicons:arrow-down-tray' },
intent: 'primary',
}}
itemsGrid={{
items: [
{
icon: { name: 'heroicons:sparkles', class: 'text-accent' },
title: 'Composable',
content: 'Blocks can be combined in any way.',
},
{
icon: { name: 'heroicons:bolt', class: 'text-success' },
title: 'Fast',
content: 'Astro delivers lightning-fast sites.',
},
{
icon: { name: 'heroicons:star', class: 'text-warning' },
title: 'Flexible',
content: 'Customize every aspect of your UI.',
},
],
}}
>
<h3>Building on modern foundations</h3>
<p>Gain a competitive advantage by incorporating industry leading practices</p>
</Content>Image on the left
Content Block
Formula Blueprint: Fun Meets Functionality!
The template is a free, customizable and production-ready template for Astro 5.0 + Tailwind CSS.
Building on modern foundations
Gain a competitive advantage by incorporating industry leading practices---
import Content from '@alfadormx/blocks/composite/Content.astro';
---
<Content
imagePosition="left"
container={{
background: {
image:
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?fit=min&auto=format&w=768&h=768',
overlayClass: 'bg-base/60 backdrop-blur-xl',
attachment: 'fixed',
},
}}
headline={{
tagline: 'Content Block',
title: 'Formula Blueprint: Fun Meets Functionality!',
subtitle:
'The template is a free, customizable and production-ready template for Astro 5.0 + Tailwind CSS.',
}}
image={{
src: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=min&auto=format',
alt: 'Demo image',
}}
action={{
label: 'Get the template',
icon: { name: 'heroicons:arrow-down-tray' },
intent: 'primary',
}}
itemsGrid={{
items: [
{
icon: { name: 'heroicons:sparkles', class: 'text-accent' },
title: 'Composable',
content: 'Blocks can be combined in any way.',
},
{
icon: { name: 'heroicons:bolt', class: 'text-success' },
title: 'Fast',
content: 'Astro delivers lightning-fast sites.',
},
{
icon: { name: 'heroicons:star', class: 'text-warning' },
title: 'Flexible',
content: 'Customize every aspect of your UI.',
},
],
}}
>
<h3>Building on modern foundations</h3>
Gain a competitive advantage by incorporating industry leading practices
</Content>Two-column layout
Content Block
Wider content column
Building on modern foundations
The content column takes three fifths of the width, with looser spacing between columns.
---
import Content from '@alfadormx/blocks/composite/Content.astro';
---
<Content
twoColumnContainer={{ ratio: '3:2', gap: 'loose' }}
headline={{
tagline: 'Content Block',
title: 'Wider content column',
}}
image={{
src: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=min&auto=format',
alt: 'Demo image',
}}
>
<h3>Building on modern foundations</h3>
<p>The content column takes three fifths of the width, with looser spacing between columns.</p>
</Content>Items grid
itemsGrid holds the items and the grid config; the grid renders when its items is non-empty.
Content Block
Items in two columns
Building on modern foundations
Gain a competitive advantage by incorporating industry leading practices
---
import Content from '@alfadormx/blocks/composite/Content.astro';
---
<Content
headline={{
tagline: 'Content Block',
title: 'Items in two columns',
}}
image={{
src: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=min&auto=format',
alt: 'Demo image',
}}
itemsGrid={{
columns: 2,
items: [
{
icon: { name: 'heroicons:sparkles', class: 'text-accent' },
title: 'Composable',
content: 'Blocks can be combined in any way.',
},
{
icon: { name: 'heroicons:bolt', class: 'text-success' },
title: 'Fast',
content: 'Astro delivers lightning-fast sites.',
},
{
icon: { name: 'heroicons:star', class: 'text-warning' },
title: 'Flexible',
content: 'Customize every aspect of your UI.',
},
{
icon: { name: 'heroicons:heart', class: 'text-error' },
title: 'Accessible',
content: 'Semantic markup out of the box.',
},
],
}}
>
<h3>Building on modern foundations</h3>
<p>Gain a competitive advantage by incorporating industry leading practices</p>
</Content>Image column
imageClass styles the wrapper around the image column; image.class styles the Image itself.
Content Block
Framed image column
Building on modern foundations
Gain a competitive advantage by incorporating industry leading practices
---
import Content from '@alfadormx/blocks/composite/Content.astro';
---
<Content
imageClass="self-center p-4 bg-surface rounded-lg"
headline={{
tagline: 'Content Block',
title: 'Framed image column',
}}
image={{
src: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=600&fit=min&auto=format',
alt: 'Demo image',
}}
>
<h3>Building on modern foundations</h3>
<p>Gain a competitive advantage by incorporating industry leading practices</p>
</Content>API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| container | ContainerProps | — | Configuration for the outer Container wrapping the block |
| headline | HeadlineProps | — | Configuration for the Headline shown above the two-column content |
| image | ImageProps | — | Configuration for the Image in the opposite column; style the column wrapper with `imageClass` |
| action | ButtonProps | — | Configuration for the Button rendered below the slotted content |
| imagePosition | 'left' | 'right' | 'right' | Side the image column sits on (default: 'right') |
| slotClass | string | — | Custom classes for the wrapper div around the slotted content |
| twoColumnContainer | TwoColumnContainerProps | — | Configuration for the TwoColumnContainer holding the content and image columns (default: { htmlTag: 'div', content: { air: 'none' }, responsive: true }) |
| itemsGrid | ItemsGridProps | — | Configuration for the ItemsGrid below the content; rendered when `items` is non-empty (default: { columns: 1, gap: 'normal', defaultItemConfig: { orientation: 'horizontal' }, class: 'mt-6 md:mt-8' }) |
| imageClass | string | — | Custom classes for the wrapper div around the image column; style the Image itself with `image.class` |