File: src/blocks/work/Work01.astro
Selected-work / project grid. Pass projects from the page (content collection). Config supplies heading, limit, and CTA defaults.
Config (blocks.ts → work)
work: {
width: "standard",
heading: "Selected work",
subheading: "A few recent projects. More case studies available on request.",
ctaLabel: "View all projects",
ctaUrl: "/work/",
},
Add to a page
---
import Work01 from "@/blocks/work/Work01.astro";
---
<Work01 />
Props override matching keys from config:
<Work01
heading="Custom headline"
/>
Props
| Prop | Config key | Type / values | Default / notes |
|---|---|---|---|
sectionId |
— |
string |
Default "work"; DOM id for the section; not in config |
heading |
work.heading |
string |
— |
subheading |
work.subheading |
string |
— |
projects |
— (page prop) |
CollectionEntry<"projects">[] |
Usually passed from the page (content collection) |
limit |
work.limit |
number |
Max items to show from the collection/array |
showCta |
work.showCta |
boolean |
Show the “view all” CTA |
ctaLabel |
work.ctaLabel |
string |
— |
ctaUrl |
work.ctaUrl |
string |
— |
