Portfolio
  • 01Home
  • 02Projects
  • 03About
  • 04Skills
  • 05Lab
  • 06Writing
  • 07Contact

© 2026 Hamza Syrage

LabView all
Arrow FieldCursorCursor SpotlightCursorGooey CursorCursorImage CompareMediaInteractive ChartDataMagnetic ButtonInteractionMarquee RevealTypographyMorphing ShapeAnimationsNested ViewsOverlaysOdometer CounterDataParticle ConstellationCanvasRipple ClickButtonsScroll RevealScrollShuffle GridLayoutStep WizardNavigationTabsNavigationTilt CardCards

UI Experiments

All Lab Entries
Animations

Morphing Shape

Continuous morphing between border-radius values with rotation.

A shape that endlessly morphs between different border-radius values while rotating. The effect is entirely CSS-driven. Motion's animate prop accepts arrays of values for each property, interpolating between them over the duration.

#Step 1: Border radius keyframes

A div cycles through border-radius values using keyframe arrays. repeat: Infinity creates a looping animation. The arrays don't need to be the same length; motion pads shorter arrays to match the longest one.

tsx
Loading...

#Step 2: Simultaneous transforms

Add scale and rotate alongside border-radius. All three animate together over the same duration. The shape pulses slightly at each morph peak and completes a full 360-degree spin.

tsx
Loading...

#Step 3: Easing comparison

Same keyframes, three different easing curves side by side. easeInOut starts slow, speeds up, then slows down. linear moves at constant speed. A custom curve like [0.16, 1, 0.3, 1] (standard motion easing) starts fast with an elastic overshoot. The easing completely changes the feel of the same animation.

[0.77, 0, 0.175, 1]
linear
[0.16, 1, 0.3, 1]
tsx
Loading...

#Step 4: Staggered grid

A 4x4 grid of identical shapes, each animating with the same keyframes but offset by a diagonal stagger. The delay calculation (Math.floor(i / 4) + (i % 4)) * 0.15 sums the row and column indices, creating a wave that ripples from the top-left to the bottom-right corner.

tsx
Loading...

#Configuration

Tune the shape preset, speed, color scheme, and rotation toggle.

All parameters
Shape
Duration6s
Color scheme
Rotate
tsx
Loading...