Skip to content

feat(Icon): animated icons, and the components that use them - #616

Merged
lorant-one merged 5 commits into
previewfrom
feat/animated-icons
Nov 28, 2026
Merged

lorant-one merged 5 commits into
previewfrom
feat/animated-icons

Conversation

@lorant-one

Copy link
Copy Markdown
Member

Requested by Lorant · project thread

Hold for a minor release (3.2): this changes how Button's arrow, Accordion, Select, Checkbox and NavIcon look in motion. It also depends on icons#3 (approval needed before that merges).

What

  • Icon animate / active. 17 built-ins move with CSS alone (check, checkbox, bell, plus, 4 chevrons, 4 arrows, refresh, eye, heart, trash, menu). animate uses the icon's own trigger (in, hover, active) or a named one; active is the on state and implies animate. Others ignore both.
  • Timing per border shape: new foundations tokens --icon-motion-duration/-ease/-ease-out/-pop on [data-border] (playful 420ms overshoot, rounded 320ms, conservative 200ms no pop). Still under reduced motion (foundations' global rule) and with micro transitions off.
  • Hover answers only under @media (hover: hover) (nothing stuck after a tap); keyboard focus-visible on the control plays it everywhere.
  • Components: Accordion flips its chevron / turns plus into a cross unless iconRotation is set (default changed from 180 to unset); Select flips its chevron; Checkbox draws its tick in when a person checks it (not on load); NavIcon draws the menu icon with the same motion; Button, IconButton and ToggleButton move bell/trash/refresh/eye/arrow icons on hover, ToggleButton passes selected to heart/plus.
  • Arrow (Button arrowIcon, Tag arrow) is the arrowRight icon, CSS only. Chevron at rest, shaft grows in on hover/focus of the surrounding link/button/data-arrow-trigger. No id/trigger needed (a Button without id never drew its arrow before), constant width so buttons no longer widen on hover. trigger is optional and still works.
  • Icon data regenerated from icons#3 (data-part, pathLength only; geometry unchanged). generate-icons also writes src/icons/motion.ts. Native synced and strips the web-only attributes.
  • Docs (Icon › Motion, Arrow, Button, NavIcon), AI spec regenerated, gotchas Icon.motion, Arrow.trigger, Accordion.icon, CHANGELOG.
  • apps/dev proof page /icon-motion-proof: every motion in the three shapes.

Checks

  • tsc --noEmit clean, full vitest suite passes (new icon-motion.test.tsx; NavIcon tests updated to the data attributes), lint gate below baseline.
  • bundle-size.json updated: the motion CSS adds ~1.6 KB gz to entries that include Icon. Arrow and NavIcon inline their paths so they don't pull the icon set.
  • Video of the motion in all three shapes: /mnt/project-files/icons/motion/icon-motion-core.mp4 (project files).

Generated by Claude Code

Icon takes animate and active: seventeen built-ins move with CSS alone,
timed by the theme's border shape (foundations --icon-motion-* tokens), still
under reduced motion. The icon data marks the moving parts (once-ui-system/icons
feat/animated-icons). Accordion and Select flip their chevrons, Checkbox draws
its tick in, NavIcon folds the menu icon, Button/IconButton/ToggleButton move
hover icons, and Arrow (Button arrowIcon, Tag arrow) is the arrowRight icon
with a CSS-only hover: no id or trigger needed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtxHFrRqCQVTTQQoYjG

Copy link
Copy Markdown
Member Author

Visual check: the 80 changed shots are the intended change. Every Button with arrowIcon now shows the arrow's chevron at rest, a fixed 16px wide instead of 0 (for example the newsletter block's "Sign up"), plus the icon motion's parts. I added the visual-change label.


Generated by Claude Code

# Conflicts:
#	packages/core/ai/bundles/app-shell.json
# Conflicts:
#	packages/core/ai/bundles/app-shell.json
#	packages/core/ai/bundles/app-shell.md
#	packages/core/ai/bundles/auth.md
#	packages/core/ai/bundles/chat.md
#	packages/core/ai/bundles/dashboard.json
#	packages/core/ai/bundles/dashboard.md
#	packages/core/ai/bundles/docs-page.md
#	packages/core/ai/bundles/editor.md
#	packages/core/ai/bundles/list-page.md
#	packages/core/ai/bundles/map-app.md
#	packages/core/ai/bundles/marketing-hero.md
#	packages/core/ai/bundles/page.md
#	packages/core/ai/bundles/pricing.json
#	packages/core/ai/bundles/pricing.md
#	packages/core/ai/bundles/roadmap.md
#	packages/core/ai/bundles/settings.md
#	packages/core/ai/components/Icon.json
#	packages/core/ai/spec.json
#	packages/core/bundle-size.json
#	packages/core/scripts/generate-icons.mjs
#	packages/core/src/components/Icon.tsx
@lorant-one
lorant-one merged commit 047516b into preview Nov 28, 2026
9 checks passed
@lorant-one
lorant-one deleted the feat/animated-icons branch November 29, 2026 13:44
@lorant-one lorant-one added the approved label Nov 29, 2026 — with Claude
@lorant-one lorant-one mentioned this pull request Nov 29, 2026
12 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants