Skip to content

Getting Started

Tegaki generates stroke data from Google Fonts and renders beautiful handwriting animations. It works with React, Svelte, Vue, SolidJS, Astro, Web Components, or vanilla JavaScript.

npm install tegaki
  1. Pick a font bundle

    Use one of the built-in font bundles:

    import bundle from 'tegaki/fonts/caveat';

    Built-in fonts: caveat, italianno, tangerine, parisienne.

    Want a different font? Use the interactive generator to create stroke data for any Google Font, then import the downloaded bundle instead:

    import bundle from './output/my-font/bundle';
  2. Render the animation

    Import the component for your framework and pass the font bundle:

    import { TegakiRenderer } from 'tegaki';
    import bundle from 'tegaki/fonts/caveat';
    
    function App() {
      return (
        <TegakiRenderer
          font={bundle}
          time={{ mode: 'uncontrolled', speed: 1, loop: true }}
          style={{ fontSize: 48 }}
        >
          Hello World
        </TegakiRenderer>
      );
    }