Open this example in the interactive library
Live preview
Source code
// components/NamedFieldGroup.tsx
import type { ReactNode } from "react";
export default function NamedFieldGroup({
heading = "Workshop",
children = "Details are available at the front desk.",
}: { heading?: string; children?: ReactNode } = {}) {
return (
<fieldset>
<legend>{heading}</legend>
{children}
</fieldset>
);
}
