# GitHub Elements

GitHub's Web Component collection.

Repository: https://github.com/github/github-elements
Canonical: https://ross.abutalabs.com/products/github-elements
Homepage: https://www.webcomponents.org/collection/github/github-elements
Language: JavaScript
License: MIT
License Family: permissive
Topics: web-components, element-collection
Last push: 2025-12-08T18:46:47+00:00
Link (homepage): https://www.webcomponents.org/collection/github/github-elements

## Health v2 (maintenance only)
Score: 57/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 56, release rhythm 35, longevity 100
- inputs: {"age_days": 2990, "days_push": 268, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2906, forks 67 (observed 2026-08-28T04:07:29.079796+00:00)

## What it is
GitHub Elements is a collection of web components from GitHub, including the <relative-time> custom element that extends the standard <time> element. It formats timestamps as localized strings or auto-updating relative text in the browser, letting servers cache HTML while clients localize dates.

## Use cases
- display relative timestamps like '5 minutes ago' that auto-update
- localize dates to the user's timezone and locale in the browser
- serve cacheable server-rendered HTML containing dates
- format timestamps with a 24-hour clock per browser settings
- show fallback date text when JavaScript is disabled
- render durations and relative dates in web apps

## When to choose
- you want localized, timezone-aware date display without server-side per-user rendering
- you need cacheable HTML fragments that still display correct dates per user
- you're building with web components or custom elements
- you want progressive enhancement with a plain-text fallback

## When to avoid
- you need to support legacy browsers without Intl.DateTimeFormat/RelativeTimeFormat and can't polyfill
- your framework already handles date localization and you don't use web components
- you need heavy date manipulation/parsing rather than display formatting

## Facets
- artifact type: library
- maturity: active
- function: ui-components, internationalization, date-time, templating
- domain: web-development, frontend
- platform: browser
- tags: web-components, custom-elements, relative-time, timezone, github-elements, localization, nodejs, javascript

## Member repositories
- github/github-elements (main) score 57
- github/relative-time-element (plugin) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:29.079796+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:55.893420+00:00, confidence not recorded.
  - readme: https://github.com/github/github-elements (fetched 2026-08-28T04:07:29.079796+00:00, sha 0ec1f9185eb3)
  - homepage: https://www.webcomponents.org/collection/github/github-elements (fetched 2026-08-29T09:17:18.590927+00:00, sha a07e50483ab0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
