Astro · Components and layouts
Accept props
Read props from Astro.props, with types.
---
interface Props {
title: string;
featured?: boolean;
}
const { title, featured = false } = Astro.props;
---
<article class:list={["card", { featured }]}>
<h2>{title}</h2>
</article>