GitHub repository
GitHub.Repo shows a card for a public GitHub repository, linking to it, with its description, stars and forks:
nodejs/node
stars forks
<GitHub.Repo repo="nodejs/node" />Flat
variant="flat" is a lighter card, on one surface:
mermaid-js/mermaid
stars forks
<GitHub.Repo repo="mermaid-js/mermaid" variant="flat" />Several repositories
Lay cards out side by side with a CardGroup:
<CardGroup cols={2}>
<GitHub.Repo repo="https://github.com/nodejs/node" variant="flat" />
<GitHub.Repo repo="https://github.com/microsoft/TypeScript" variant="flat" />
</CardGroup>How it works
The repository’s name and link are part of the page. The description, stars and forks are loaded from GitHub when the page opens, and kept for the rest of the reader’s visit - GitHub allows 60 of those requests an hour per reader. If GitHub doesn’t answer, the card still links to the repository.
Props
repo string required
owner/name, or the repository’s https://github.com/... URL.
variant "inset" | "flat" default: inset
inset puts the details on an inner, shaded surface; flat is one surface, with less padding.
Components › Reference