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

Composable
Blocks can be combined in any way.
Fast
Astro delivers lightning-fast sites.
Flexible
Customize every aspect of your UI.
Demo image
default
---
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.

Demo image

Building on modern foundations

Gain a competitive advantage by incorporating industry leading practices
Composable
Blocks can be combined in any way.
Fast
Astro delivers lightning-fast sites.
Flexible
Customize every aspect of your UI.
image-left
---
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.

Demo image
two-column
---
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

Composable
Blocks can be combined in any way.
Fast
Astro delivers lightning-fast sites.
Flexible
Customize every aspect of your UI.
Accessible
Semantic markup out of the box.
Demo image
items-grid
---
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

Demo image
image-column
---
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

PropTypeDefaultDescription
containerContainerProps—Configuration for the outer Container wrapping the block
headlineHeadlineProps—Configuration for the Headline shown above the two-column content
imageImageProps—Configuration for the Image in the opposite column; style the column wrapper with `imageClass`
actionButtonProps—Configuration for the Button rendered below the slotted content
imagePosition'left' | 'right''right'Side the image column sits on (default: 'right')
slotClassstring—Custom classes for the wrapper div around the slotted content
twoColumnContainerTwoColumnContainerProps—Configuration for the TwoColumnContainer holding the content and image columns (default: { htmlTag: 'div', content: { air: 'none' }, responsive: true })
itemsGridItemsGridProps—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' })
imageClassstring—Custom classes for the wrapper div around the image column; style the Image itself with `image.class`