Skip to main content
Mintlify

Search documentation

Type to search this documentation.

On this pageOverview

GitHub

Use the GitHub component to embed a public repository card with a live description, star count, and fork count on any documentation page.

Use the <GitHub.Repo> component to embed a card that links to a public GitHub repository. The card fetches the repository's description, star count, and fork count from the public GitHub API when the page loads.

Pass a repository as either an owner/name slug or a full GitHub URL.

react
<GitHub.Repo repo="mintlify/docs" />

Choose between the inset and flat layouts to match the surrounding page.

The default variant. Wraps the repository details in a rounded inner surface.

MDX
<GitHub.Repo repo="mintlify/docs" variant="inset" />

A single-surface layout with tighter padding. Use flat when embedding the card next to other bordered elements.

MDX
<GitHub.Repo repo="mintlify/docs" variant="flat" />
  • repo (string) — The GitHub repository to display. Accepts an owner/name slug (for example, mintlify/docs) or a full GitHub URL (for example, https://github.com/mintlify/docs).

  • variant (string) — Card layout.

Options: inset, flat.

  • className (string) — Additional CSS classes to apply to the card.
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu