<span id="element"></span>
body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 3rem;
  padding: 0 2rem;
  font-weight: 600;
}
View Compiled
new TypeIt("#element", {
  speed: 50,
  strings: "You're a star.",
  cursorChar: "⭐",
  cursor: {
    autoPause: false,
    animation: {
      options: {
        duration: 1500,
        easing: "linear",
        direction: "alternate",
      },
      frames: [
        {
          transformOrigin: "0.575em 0.7em",
          transform: "rotate(0deg) scale(.5)",
        },
        {
          transformOrigin: "0.575em 0.7em",
          transform: "rotate(360deg) scale(2.5)",
        },
      ],
    },
  },
}).go();

External CSS

  1. https://fonts.googleapis.com/css2?family=Inter:wght@100;300;700;900&amp;display=swap

External JavaScript

  1. https://unpkg.com/typeit@8.7.0/dist/index.umd.js