Icon Preview & Animation
Select two icons and see how they animate between states in real-time.
dt-home
Icons
No icons match
Try a shorter word, or a different spelling (for example "mail" instead of "email").
1,440 stroke icons that turn into each other with spring physics. Under 3 KB for the engine, no dependencies, and components for every framework.
npm install dt-icon
Select two icons and see how they animate between states in real-time.
dt-home
No icons match
Try a shorter word, or a different spelling (for example "mail" instead of "email").
Copy and paste the code below. Works with any framework.
Step by step for each stack: install, register the icons you use, draw or morph.
| Function | Does |
|---|---|
registerIcons(defs) | Adds { name: strokes }. Later calls override earlier ones. |
drawIcon(svg, name) | Draws at once. Returns false for an unknown name. |
morphIcon(svg, name, options) | Morphs from what is on screen, including a morph in progress. Returns a promise that settles when it ends or is interrupted. |
scrubIcon(svg, from, to, t) | Shows the icon at a fixed point between two icons (t 0 to 1), no animation. Drive it from a slider, scroll or a gesture. |
initIcons(root) | Draws every svg[data-icon] under root. |
toggleIcon(button) | Swaps a toggle button's icon; returns true while the toggle icon shows. |
hasIcon(name), listIcons(), motions | Look up registered icons and the spring preset names. |
| Import | Components |
|---|---|
dt-icon/react | DtIcon, DtIconMorph |
dt-icon/vue | DtIcon, DtIconMorph |
dt-icon/svelte/DtIcon.svelte, .../DtIconMorph.svelte | Svelte 5 components |
dt-icon/element | <dt-icon>, <dt-icon-morph> custom elements: Angular, HTML, Astro, any template language |
DtIcon props: name, size, stroke, label, motion, speed. DtIconMorph props: from, to, active, animation, speed, progress, size, stroke, label.
| Option | Default | Does |
|---|---|---|
motion | 'smooth' | 'smooth', 'snappy', 'bouncy', or { stiffness, damping, mass } for a custom spring. |
speed | 1 | Playback rate: 0.5 is half speed, 2 is twice as fast. |
duration, easing | none | Setting either replaces the spring with a plain tween (milliseconds, t => t). |
onProgress | none | Called every frame with the progress; springs may pass 1 on the way (bouncy overshoots) and it ends on exactly 1. |
With prefers-reduced-motion: reduce, morphIcon changes the icon instantly. Icons are strokes on a 24x24 grid; size and weight come from --dt-icon-size and --dt-icon-stroke.
TanDD Icons (dt-icon) is a free library of 1,440 stroke icons that morph smoothly into each other with spring physics. The engine is about 3 KB gzipped and has no dependencies.
React and Next.js, Vue and Nuxt, Svelte 5, Angular, Astro, plain HTML and any server-rendered stack such as Laravel, Rails or PHP, through ready-made components and <dt-icon> custom elements.
Run npm install dt-icon, then register the icons you use, or load dist/dt-icon.element.min.js from a CDN for the custom elements. The install guides above cover every stack.
Yes. dt-icon is free for personal and commercial projects under the MIT license.
Yes. With prefers-reduced-motion: reduce every icon changes instantly instead of animating.
dt-icon is free to use in personal and commercial projects. The code is MIT. Keep the LICENSE and NOTICE files that ship in the package when you redistribute it.