Open this example in the interactive library
Live preview
Source code
// components/CardWithExpandableNotes.tsx
export default function CardWithExpandableNotes({
title = "Field notes",
body = "A guide to the workshop",
}: { title?: string; body?: string } = {}) {
return (
<article>
<h2>{title}</h2>
<details>
<summary>Read notes</summary>
{body}
</details>
</article>
);
}
