Dev Helpers
← Back

Expandable author biography

Import and render <ExpandableAuthorBiography /> in a React project.

Open this example in the interactive library

Live preview

Source code

// components/ExpandableAuthorBiography.tsx

export default function ExpandableAuthorBiography({
  name = "Mira Bell",
  role = "Editor",
}: { name?: string; role?: string } = {}) {
  return (
    <details>
      <summary>About {name}</summary>
      <dl>
        <dt>Contributor</dt>
        <dd>{name}</dd>
        <dt>Role</dt>
        <dd>{role}</dd>
      </dl>
    </details>
  );
}