Skip to content

feat(registry): add the loader line fold, loader iris ring and testimonial ring blocks - #26

Merged
Arifulislam5577 merged 3 commits into
mainfrom
feat/loader-and-testimonial-blocks
Oct 7, 2026
Merged

Arifulislam5577 merged 3 commits into
mainfrom
feat/loader-and-testimonial-blocks

Conversation

@moshiur01

Copy link
Copy Markdown
Contributor

Adds three blocks: two first-load preloaders ported from the Prisma and Kairo templates, and Kairo's 3D testimonial ring. All three are dressed in the Tween UI palette and ship with gallery media.

Loader Line Fold

  • The wordmark rises letter by letter out of its masks while a lime hairline fills along the bottom edge, with a zero-padded counter riding its tip.
  • Honest progress. The counter eases to 90% over minDuration, then waits for ready (by default document.fonts plus a decode() of every image inside, capped at 6s) before running the last 10%.
  • The line travels to the middle, folds into a point, and the page opens out of it through an even-odd clip-path hole, width leading height, while the content settles from a dim 125% zoom.
  • Opens onto a white placeholder hero ("Your awesome hero here"). Sidebar icon fold-horizontal, with a new squeeze hover motion.

Loader Iris Ring

  • A ring gauge sweeps through uneven steps in one continuous tween. Kairo ran eleven separate eased tweens, so the arc nearly stopped at every step. The percentage is read off the arc, so the two never disagree.
  • Tech photos flash through the lens while four corner counters (components, blocks, test suites, motion-safe items) sync and go live on Number Flow.
  • An iris mask opens from the lens, and the ring flies into the nav mark. The landing spot is measured with the page at its settled scale, since the page is still zooming in mid-flight. The ring also takes on the mark's colours, so it stays visible against the white hero.
  • IrisRingMark is exported; any element with data-loader-target works. Without a target the ring swells and fades instead. Sidebar icon loader-circle (spin).

Testimonial Ring

  • Cards stand on a 3D ring over a reflecting grid floor. Drag it with inertia and a snap, use the arrow buttons or ←/→, click a side card, or scroll. The front card's quote blurs in and its metric rolls on Number Flow.
  • A lime Drag plate replaces the cursor only while a mouse is over a card. It squeezes to "Spin" when grabbed and leans like jelly into the pull. It's re-checked every frame, so it follows a ring that turns under a still pointer. Touch screens keep the native cursor.
  • Sidebar icon cylinder (flip).

Worth calling out in review

  • Loaders fill their own section by default, so they work in the docs preview and its Replay button. fullscreen covers the viewport and locks page scroll for a real first load. onComplete replaces the source templates' hero gates.
  • Two bugs fixed from Kairo's ring: click-to-front never worked there, because pointer capture retargets pointerup to the stage (it now hit-tests under the pointer), and a section that loaded already in view started on the second card (scroll rotation now counts from the load position).
  • Sample content is fictional. The testimonial people and companies are invented, as in the other testimonial blocks, and the docs page says so. Photos are from Unsplash.
  • Gallery media: the recordings were wider than 16:10, so each keeps its full width and the top and bottom are extended from the edge pixels, rather than cropping off the loader's corner counters. The system pointer, the Next.js dev badge, the loading bar and the recording border are removed. The testimonial clip is trimmed to 8.1s and ends on its opening state so it loops cleanly. Clips are 129 KB, 72 KB and 465 KB.

Under prefers-reduced-motion: reduce: no loader at all (onComplete fires at once); the ring steps straight to each card with no spin, blur, roll or drag plate.

Checks

Typecheck is clean, registry:build passes and the full test suite passes (899 tests, 36 new across the three blocks). Each block was checked in headless Chrome at desktop and phone widths. next build was not run locally.

Two first-load preloaders, both dressed as Tween UI and opening onto a
white placeholder hero.

Loader Line Fold: the wordmark rises letter by letter while a lime
hairline fills with a counter riding its tip. The counter holds at 90%
until fonts and every image inside have decoded, then the line travels
to the middle, folds into a point, and the page opens out of it through
an even-odd clip-path hole, width leading height.

Loader Iris Ring: a ring gauge sweeps through uneven steps in one
continuous tween while tech photos flash through its lens and four
corner counters sync on Number Flow. An iris mask opens from the lens
and the ring flies into the nav mark, measured at the page's settled
scale and taking on the mark's colours as it lands.

Both fill their own section for the docs preview, or cover the viewport
and lock scroll with `fullscreen`. Under reduced motion there is no
loader and `onComplete` fires at once.

Includes the demos, docs pages, tests and sidebar icon motion.
Testimonial cards stood on a 3D ring over a reflecting grid floor that
slides as the ring turns. Drag it and it spins with the hand, carries
the flick's inertia and snaps to the card it would land on; the arrow
buttons, the arrow keys, clicking a side card and scrolling the page
turn it too. Cards darken as they turn away, and whichever reaches the
front blurs its quote, name and label in while the metric rolls on
Number Flow.

A lime "Drag" plate replaces the cursor while a mouse is over a card,
squeezes to "Spin" when the ring is grabbed and leans like jelly into
the pull. It is checked every frame, so it follows a ring that turns
under a still pointer, and touch screens keep the native cursor.

Ported from the Kairo template with two fixes: click-to-front now hit
tests under the pointer, since pointer capture retargets the release to
the stage, and scroll rotation counts from the load position, so the
first card always starts in front. The radius is solved from the card
width in container units, and testimonials repeat until the ring has at
least ten cards. Under reduced motion it steps straight to each card
and nothing spins, blurs or rolls.

Includes the demo, docs page, tests and sidebar icon motion.
Poster and hover clip for Loader Iris Ring, Loader Line Fold and
Testimonial Ring. 1280x800, 30fps, H.264 High, no audio track.

The recordings were wider than 16:10, so each keeps its full width and
the top and bottom are extended from the edge pixels rather than
cropping the loader's corner counters. The system pointer, the Next.js
dev badge, the route loading bar and the recording's rounded border are
removed. The testimonial clip is trimmed from 20.9s to 8.1s and ends on
its opening state so the loop is seamless.

Clips: 129 KB, 72 KB and 465 KB, down from 2.3 MB, 3.3 MB and 28 MB.
@vercel

vercel Bot commented Oct 7, 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 7, 2026 5:56am UTC

@Arifulislam5577
Arifulislam5577 merged commit 6f26f6b into main Oct 7, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 35b9a37e Deployed Oct 7, 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.

2 participants