Skip to content

feat(registry): add the kinetic type ring block - #23

Merged
Arifulislam5577 merged 2 commits into
mainfrom
feat/kinetic-type-ring
Oct 1, 2026
Merged

Arifulislam5577 merged 2 commits into
mainfrom
feat/kinetic-type-ring

Conversation

@Arifulislam5577

Copy link
Copy Markdown
Contributor

Adds Kinetic Type Ring, a block whose phrase is wrapped once around a ring built in real 3D.

The block

Every glyph is measured and given an arc as wide as the letter itself, so I and W space evenly rather than sitting on a fixed grid. The type size is solved from the stage so the loop closes at any width, and a ResizeObserver re-solves on any box change — the ring fills the same share of the stage on a phone as in a full-width hero.

A dot falls, squashes on impact, and pulls the letters out of a blur in a sweep that rolls round from the one nearest the camera. After that the ring idles; drag, scroll and the arrow keys add spin that decays back to the idle rate, and the dot swells or shrinks with the push.

Two things worth calling out in review:

  • Nothing starts until a solve lands. The first paint usually beats layout, so the intro is gated on the first successful solve — from the observer if need be — rather than playing to a stage it cannot measure.
  • One writer per element. The solve owns the outer span's transform, GSAP owns the glyph inside it. Nothing touches both, so a resize mid-intro cannot wipe a tween.

Under prefers-reduced-motion: reduce the ring is laid out and shaded, the dot sits in the middle, and nothing moves. The ring itself is aria-hidden — the phrase reaches screen readers once from a visually-hidden paragraph instead of letter by letter — and the stage is focusable with the arrow keys doing what dragging does.

Preview page

The preview page centred every block in a min-h-svh column, so a block that sizes itself off its parent had no height to read and sat in a band of page background. It now uses a single 1fr row, which offers the screen height instead of imposing it: items-center leaves every other block at the height its content asks for, centred exactly as before.

Checks

  • pnpm registry:build — generated files committed, no drift
  • pnpm typecheck
  • pnpm test — 795 passing, 9 of them new
  • pnpm build
  • Checked with reduced motion, with the keyboard, and at phone width

The preview page centred every block in a `min-h-svh` column, so one that
sizes itself off its parent had no height to read and sat in a band of
page background. A single `1fr` row offers the screen height instead of
imposing it: `items-center` leaves a block at the height its content asks
for, centred as before, while one that sets `h-full` resolves against the
row and fills the screen.
A phrase wrapped once around a ring built in real 3D. Every glyph is
measured and given an arc as wide as the letter itself, so `I` and `W`
space evenly, and the type size is solved from the stage so the loop
closes at any width — a `ResizeObserver` re-solves it on any box change.

Nothing starts until a solve lands. The first paint usually beats layout,
and gating the intro on that is what keeps it from playing to an empty
stage. The solve owns the outer span's transform and GSAP owns the glyph
inside it, so a re-solve mid-intro cannot wipe a tween.

A dot falls, squashes on impact and pulls the letters out of a blur in a
sweep that rolls round from the one nearest the camera. After that the
ring idles; drag, scroll and the arrow keys add spin that decays back to
the idle rate, and the dot swells or shrinks with the push.
@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
tween-ui Ready Ready Preview Oct 1, 2026 1:16pm UTC

@Arifulislam5577
Arifulislam5577 merged commit c19488e into main Oct 1, 2026
3 checks passed
@Arifulislam5577
Arifulislam5577 deleted the feat/kinetic-type-ring branch October 1, 2026 13:17

This branch was successfully deployed

1 active deployment
Preview — 0c994827 Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant