Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Charts & Stats

GitHub Activity

Charts & Stats

GitHub Activity React chart component for Tailwind CSS v4

GaugeHeatmap calendar
Live props
Content
username
year
avatarCount3
months12
label
locale
headingLabel
yearLabel
notFoundLabel
dayLabel
dayLabelOne
showReposLabel
hideReposLabel
Appearance
accent
cellSize11px
cellRadius3px
background
radius28px
chevronColor
showMonths
State
defaultOpen
Code
import GitHubActivity from "@/components/ui/github-activity"

<GitHubActivity />
  1. Home
  2. Components
  3. Charts & Stats
  4. GitHub Activity
Free

GitHub Activity React chart component for Tailwind CSS v4

v1.0.1·Updated in 1.2.1

A React GitHub contribution graph: a yearly heatmap with a panel of your top repositories.

The grid sweeps in column by column, then the month labels blur into focus. Hover any cell, or press one on a touchscreen, for its count and date. Click the chevron to expand the top repositories over the grid, their avatars flying out of the stack into rows, and again to fold them back. The grid shows as many recent weeks as fit its width, so it never scrolls sideways on a phone.

GitHub Activity is a free React chart component in the React chart and stat components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add github-activity, together with UIProvider and the npm package motion.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add github-activity

Usage

Import GitHubActivity from @/components/ui/github-activity.

import GitHubActivity from "@/components/ui/github-activity"

export function Demo() {
  return <GitHubActivity username="octocat" />
}

// or pass everything yourself:
// <GitHubActivity
//   contributions={contributions}
//   repos={[{ name: "Zero mail", count: 412, logo: <ZeroIcon /> }]}
//   accent={["#0e4429", "#006d32", "#26a641", "#39d353"]}
// />

Props

  • usernamedefault ""
    string

    A GitHub username to load the last year of contributions and the most-pushed repositories for, from public APIs. Ignored for whichever of contributions or repos you pass yourself. An unknown or invalid name shows a not found heading and calls onError.

  • contributionsdefault "[]"
    Contribution[]

    Your own contribution data, one { date, count, level } per day in date order, starting on a Sunday. Level 0 to 4 picks the shade.

  • reposdefault "[]"
    RepoContribution[]

    The repositories listed in the footer, highest first: { name, count, logo?, href? }. The first avatarCount (3) stack as avatars; a missing logo shows the initial.

  • yeardefault 0
    number

    Overrides the year in the heading. 0 uses the year of the latest contribution (2025 in this sample).

  • accentdefault "#39d353"
    string | string[]

    The color of the contribution squares. One color is faded per level; an array of four shades (or five, with the empty color first) sets each level exactly.

  • cellSizedefault 11
    number

    Size of each day square in pixels. The gap scales with it.

  • cellRadiusdefault 3
    number

    Corner radius of each day square in pixels.

  • backgrounddefault ""
    string

    Any CSS color for the card. Empty is white in light mode and black in dark mode. The heading and the panel keep the theme colors, so pick a background that suits the theme.

  • radiusdefault 28
    number

    Corner radius of the card in pixels; the repository panel inside follows it minus 10px.

  • chevronColordefault ""
    string

    Any CSS color for the round chevron that opens the panel. Empty uses #C4C9CC light, #3E4346 dark. It keeps a 44px hit area on touch screens.

  • avatarCountdefault 3
    number

    How many repository avatars stack in the closed footer (and, with username, how many repositories are fetched).

  • monthsdefault 12
    number

    How many months of history to show, at most. The grid also drops older weeks that do not fit its width.

  • showMonthsdefault false
    boolean

    Adds a row of month names above the grid.

  • labeldefault "Top contributions in:"
    string

    Text shown in the footer next to the avatars.

  • localedefault ""
    string

    Intl locale for the month names, the tooltip date and the heading count. Falls back to UIProvider's locale, then en-US.

  • headingLabeldefault "{count} contributions"
    string

    Heading template; {count} fills in the total.

  • yearLabeldefault "in {year}"
    string

    Appended to the heading when there is a year; {year} fills in.

  • notFoundLabeldefault "No public activity found for {login}"
    string

    Heading when username has no public calendar; {login} fills in.

  • dayLabeldefault "{count} contributions on {date}"
    string

    Tooltip template for a day; {count} and {date} fill in.

  • dayLabelOnedefault "{count} contribution on {date}"
    string

    Tooltip template for a day with exactly one contribution.

  • showReposLabeldefault "Show top repositories"
    string

    Accessible name of the chevron while the panel is closed.

  • hideReposLabeldefault "Hide top repositories"
    string

    Accessible name of the chevron while the panel is open.

  • defaultOpendefault false
    boolean

    Starts with the repository panel open. Ignored when open is set.

  • open
    boolean

    Panel state for controlled usage. When set, the component stops managing its own state.

  • onOpenChange
    (open: boolean) => void

    Called with the next state when the chevron is clicked.

  • onError
    (username: string) => void

    Called when username is not a valid GitHub login or its calendar cannot be loaded, for example to fall back to data you pass yourself.

  • className
    string

    Extra classes for the card that wraps the grid. Its width fits the visible weeks (at least 320px) and is capped at the parent width; pass max-w-* to show fewer weeks.

Parts

  • Contribution

    type

    One day of contributions: { date: "YYYY-MM-DD", count, level: 0 | 1 | 2 | 3 | 4 }. Pass them oldest first, starting on a Sunday.

  • RepoContribution

    type

    One repository in the footer: { name, count, logo?, href? }.

  • ContributionLevel

    type

    The five intensity steps of a day, 0 (none) to 4 (most).

Examples

Your own color scale

An array of four shades sets each level exactly; showMonths adds the month row.

Last six months, round cells

months 6 with larger cells and a radius of half the cell, in orange.

Repositories open

defaultOpen starts with the top repositories expanded over the grid; the chevron folds them back.

Dependencies

motionui-config

Files

  • components/ui/github-activity.tsx

FAQ

Is the React GitHub Activity chart component free?

Yes. The source is free and needs no account: copy it from the Code tab or install it with the CLI.

How do I install GitHub Activity?

Run npx wingo-ui@latest add github-activity. It also adds the Wingo UI item it builds on (UIProvider) and the npm package motion. With shadcn, run npx shadcn@latest add https://wingo-ui.com/r/github-activity.json.

How does GitHub Activity behave on phones?

The grid shows as many recent weeks as fit its width, so it never scrolls sideways on a phone.

See also

Heatmap calendarSparklineStat CardBar chartAvatar

Used in

Profile Page

More React chart and stat components

Animated CounterRadial barTrackerLeaderboardArea chartDonut chart
All 16 React chart and stat components

Articles using this component

  • Shadcn Profile Page in React: Follow, Tabs and Edit Sheet

    Build it: screens and apps · Nov 6, 2026 · 9 min read

  • React GitHub Contribution Graph: Data, Themes and A11y

    Component guides · Oct 19, 2026 · 9 min read

PreviousGaugeNext Heatmap calendar

1863 contributions in 2025

Top contributions in: