Morphing Icons
Icons that transform through actual shape transformation, not crossfades. Inspired by Benji’s experiments with Claude.Core Concept
Every icon uses exactly three SVG lines. Icons that need fewer lines collapse the extras to invisible points. This means any icon can morph into any other since they share the same underlying structure.Three-Line Structure
All icons are defined with three lines, each with coordinates and optional opacity:Collapsed Lines
When an icon needs fewer than three lines, unused lines collapse to a single point at the center with zero opacity:Example Icons
Menu Icon (3 lines)
Minus Icon (1 line + 2 collapsed)
Check Icon (2 lines + 1 collapsed)
Rotation Groups
Icons with shared base shapes can rotate between variants instead of morphing lines. This is controlled by thegroup property:
Animation Implementation
The morphing effect uses motion’s spring physics to animate line coordinates:Accessibility
The component respects user motion preferences:Usage Example
Available Icons
The system supports 27 icons:- Navigation: menu, cross, chevron-right, chevron-down, chevron-left, chevron-up, arrow-right, arrow-down, arrow-left, arrow-up
- Actions: plus, minus, check, play, pause, download, upload, external
- Symbols: equals, asterisk, more, grip, slash, corner