Skip to content

    Browse components

    GitHub Activity

    A contribution calendar on a squircle card whose busiest repos stack as avatars and expand into a drawer over the grid.

    Credit: Calamansi UI (MIT)

    Open
    Customize
    calamansi
    white
    slate
    citrus

    Installation

    npx shadcn@latest add @glint-ui/github-activity

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/github-activity.json

    Usage

    import { GithubActivity } from "@/components/ui/github-activity";
    
    <GitHubActivity username="fujiDevv" />
    
    // or drive it from your own data
    <GitHubActivity contributions={days} repos={repos} />

    Props

    PropTypeDefaultDescription
    variant"calamansi" | "white" | "slate" | "citrus""calamansi"Surface palette, with its own contribution ramp.
    cellSizenumber11Size of one day, in px.
    monthsnumber12Months of history to show when there is room; the grid trims to fit.
    showMonthsbooleanfalseShow month labels above the grid.
    labelstring"Top contributions in:"Label on the repository drawer.
    defaultOpenbooleanfalseOpen the repository drawer on mount.
    accentstring—One colour (faded by opacity) or a 4-step array for levels 1-4. Defaults to the variant ramp.
    usernamestring—GitHub login. When set, the calendar and recent pushes are fetched in the browser.
    contributionsReactNode—`{ date, count, level }[]` starting on a Sunday. Pass it to skip the network.
    reposReactNode—`{ name, count, logo?, href? }[]` for the drawer.
    yearnumber—Year in the heading. Defaults to the year the data ends on.
    openboolean—Controlled drawer state.
    onOpenChangeReactNode—`(open) => void`, fired when the drawer toggles.
    classNamestring—Extra classes for the root element.