minflow

Actions

Icon swap

State changes on icon-only controls are easy to miss. Icon swap crossfades and counter-rotates between two glyphs so the change registers without a label, which is what lets copy buttons, play controls, and theme toggles stay wordless.

npx shadcn@latest add @minflow/icon-swap

Where to use it

  • Copy buttons that confirm with a tick.
  • Play and pause, mute and unmute, light and dark.
  • Any binary control where the glyph itself is the state.

Variations

Two-state swap

The standard case: one glyph in, one glyph out, crossfaded.