r3f-xr-widgets / GitHubBadge
Function: GitHubBadge()
GitHubBadge(
props):Element
Defined in: src/components/GitHubBadge.tsx:42
GitHub repository badge/link component for demos
Displays a styled button with the GitHub logo and repository name extracted from the URL. Useful for adding repository links to demo applications and documentation.
Parameters
props
Returns
Element
Examples
tsx
<GitHubBadge repoUrl="https://github.com/pmndrs/r3f-xr-widgets" />tsx
function Demo() {
return (
<div>
<h1>My XR Demo</h1>
<Canvas>
{/* ... 3D content ... */}
</Canvas>
<GitHubBadge repoUrl="https://github.com/username/my-demo" />
</div>
)
}