Skip to content

SimplyPrint/torph

 
 

Repository files navigation

Torph

SimplyPrint fork — published as @simplyprint/torph on GitHub Packages. Ports the Svelte TextMorph component back to Svelte 4 syntax so it runs in Svelte 4 hosts. Upstream: lochie/torph.

Dependency-free animated text morphing component for React, Vue, Svelte, and vanilla JavaScript.

Installation

pnpm i torph

Usage

import { TextMorph } from "torph/react";

<TextMorph>Hello world</TextMorph>;

Spring Animations

Use physics-based spring easing by passing spring parameters to ease:

import { TextMorph } from "torph/react";

<TextMorph ease={{ stiffness: 200, damping: 20 }}>Hello world</TextMorph>;

See the package README for full API documentation.

Contributing

Install dependencies

pnpm install:all

Dev/Watch Library and Example

pnpm dev

Build Library

pnpm build

Found this useful?

Follow me on Twitter.

Other projects

You might also like:

Acknowledgements

  • Thanks to Alex for assistance with the site design.
  • Thanks to Pugson for putting up with my bullshit.
  • Thanks to Benji for coining the Torph name and outlining the method in Family Values.

About

SimplyPrint fork of torph with Svelte 4 compat. Published as @simplyprint/torph on GitHub Packages.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 71.8%
  • SCSS 18.1%
  • JavaScript 4.3%
  • Svelte 3.5%
  • HTML 1.6%
  • Vue 0.7%