Swaps one icon for another with a short scale and blur.
icon-swap-demo.tsx
The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.
npm
yarn
pnpm
bun
copy-indicator.tsx
Any element can be a child, such as a Spinner. Also install Button and Spinner.
icon-swap-loading-demo.tsx
- contentKey: string | numberRequired
- Identifies the current icon. A change animates the new icon in and the old icon out.
- children: ReactNodeRequired
- The icon to show. It is hidden from assistive technology, so label the control that contains it.