Skip to content

feat(registry): add the arrow tile, focus frame and slant morph buttons - #30

Merged
Arifulislam5577 merged 3 commits into
mainfrom
feat/split-arrow-button
Oct 8, 2026
Merged

Arifulislam5577 merged 3 commits into
mainfrom
feat/split-arrow-button

Conversation

@moshiur01

@moshiur01 moshiur01 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Adds three new button components to the registry.

Arrow Tile Button (arrow-tile-button)

A label slab paired with a detached arrow tile, in two variants shown side by side in one preview:

  • tilt � the tile knocks the slab, which is shoved back and springs into place while the letters topple in a wave away from the tile.
  • swap � the tile rolls to the front of the label, its arrow spinning a full turn, while the letters lift in its wake.

Both squash on press. Pure CSS.

Focus Frame Button (focus-frame-button)

A lime button inside a hairline frame. On hover or focus the frame folds back into its corners and the corner brackets snap shut around the button, like a viewfinder locking focus. The label rolls up to a fresh copy and a new return arrow slides in. The closing corners double as the focus indicator. Pure CSS.

Slant Morph Button (slant-morph-button)

A monospace label and a slanted arrow tile meeting along a diagonal seam. On hover or focus both edges are genuinely reshaped with GSAP MorphSVG (no opacity crossfade), swinging the seam from / to \ like a hinge in one smooth eased stroke, while the colors trade places and a fresh arrow slides through. Depends on gsap and @gsap/react; MorphSVG ships inside gsap.

Accessibility

All three are native <button>s with the visible label as the accessible name; split, rolled or decorative copies and shapes are aria-hidden. Hover and keyboard focus trigger the same motion, and prefers-reduced-motion switches it off (the morph button only swaps colors there and on touch).

Checks

  • pnpm registry:build
  • pnpm typecheck
  • pnpm test � 61 files, 1,040 tests, including new suites for all three buttons
  • pnpm format:check
  • pnpm build

Gallery media

Each button has a WebP poster (taken from the clip's first frame) and an optimized preview clip: 30fps, CRF 30, no audio, faststart. The clips are 36, 24 and 32 KB.

Arrow Tile Button pairs a label slab with a detached arrow tile in two
variants. In tilt, the tile knocks the slab and the letters topple in a
wave away from it before springing upright. In swap, the tile rolls to
the front of the label while the letters lift in its wake. Both squash
on press.

Focus Frame Button sits inside a hairline frame that folds back into its
corners on hover while the corner brackets snap shut around the button.
The label rolls up to a fresh copy and a new return arrow slides in.

Both are pure CSS, with a demo, docs page and tests.
A monospace label slab meets a slanted arrow tile along a diagonal seam.
On hover or focus both edges are reshaped with GSAP MorphSVG, swinging
the seam from / to \ like a hinge in one smooth eased stroke, while the
colors trade places and a fresh arrow slides through. Reduced motion and
touch keep the shapes still and only swap the colors.

Includes the demo, docs page and tests.
@vercel

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

…ph buttons

Posters are WebP stills taken from each clip's first frame, so the swap
to video on hover lines up. The previews are re-encoded at 30fps and
CRF 30 with no audio track and faststart, matching the other button
previews. The clips drop from 136, 76 and 112 KB to 36, 24 and 32 KB.
@Arifulislam5577
Arifulislam5577 merged commit 4f6f0a8 into main Oct 8, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 728379b3 Deployed Oct 8, 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