TanDD Icons

Morph any icon into any other.

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

Icon Preview & Animation

Select two icons and see how they animate between states in real-time.

Animation
Speed
Stroke

dt-home

t = 1.00

Icons

    Use in your project

    Copy and paste the code below. Works with any framework.

    Single icon

    Animated morph

    Install guides

    Step by step for each stack: install, register the icons you use, draw or morph.

    API

    FunctionDoes
    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(), motionsLook up registered icons and the spring preset names.

    Components

    ImportComponents
    dt-icon/reactDtIcon, DtIconMorph
    dt-icon/vueDtIcon, DtIconMorph
    dt-icon/svelte/DtIcon.svelte, .../DtIconMorph.svelteSvelte 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.

    morphIcon options

    OptionDefaultDoes
    motion'smooth''smooth', 'snappy', 'bouncy', or { stiffness, damping, mass } for a custom spring.
    speed1Playback rate: 0.5 is half speed, 2 is twice as fast.
    duration, easingnoneSetting either replaces the spring with a plain tween (milliseconds, t => t).
    onProgressnoneCalled 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.

    Frequently asked questions

    What is TanDD Icons?

    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.

    Which frameworks does dt-icon support?

    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.

    How do I install dt-icon?

    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.

    Is dt-icon free for commercial use?

    Yes. dt-icon is free for personal and commercial projects under the MIT license.

    Does it respect reduced motion?

    Yes. With prefers-reduced-motion: reduce every icon changes instantly instead of animating.

    License

    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.

    Choose an icon