Components
Swap
Animated hand-off between the states of a button or label: copied, pending, done.
Composition
Copy confirmation
Render every state once; change only the Swap value.
- <Swap>
- <SwapItem />
Installation
The Control UI source installs this component from src/registry/sources/control-ui/ui/swap.tsx.
Raw code
Primary installed source
Knobs
Typed custom properties the recipe paints with. Set one on the root — style, a utility class, or a skin — and every slot inherits it.
--cui-swap-* · 4 knobsHow the cascade resolves--cui-swap-animation-duration<time>var(--duration-slow)--cui-swap-easing*var(--ease-emphasized)--cui-swap-label-inset<length-percentage>60%--cui-swap-icon-scale<number>0.5