# Typing Text

Text that types, pauses, and deletes words from a list in turn, with a blinking cursor. Pauses when off screen.

- Category: Animations
- Status: stable
- Registry: https://markas.jenderalcorp.com/r/typing-text.json
- CLI: `npx markasui@latest add typing-text`

## When to use

Rotating a key word in a hero headline or showing a command being typed.

- Keep the words short and similar in length to limit layout movement
- Put the static part of the sentence outside the component
- Set loop to false for a single command that should stay on screen
- Blade needs Alpine.js

## Code

### Blade

Save at `resources/views/components/markas/typing-text.blade.php`. Dependencies: alpinejs.

```blade
@props([
    'words' => [],
    'typeSpeed' => 70,
    'deleteSpeed' => 40,
    'pause' => 1800,
    'loop' => true,
    'cursor' => true,
])

@php
    $root = 'inline';
    $caret = 'ml-0.5 inline-block h-[1.1em] w-0.5 bg-current align-[-0.2em]';

    $words = array_values($words);
@endphp

<span
    x-data="{
        words: @js($words),
        text: @js($words[0] ?? ''),
        timer: null,
        observer: null,
        animation: null,
        init() {
            if (this.words.length === 0 || window.matchMedia?.('(prefers-reduced-motion: reduce)').matches) return;
            const list = this.words.map((word) => Array.from(word));
            let index = 0;
            let count = list[0].length;
            let deleting = false;
            {{-- Kursor berkedip setiap 500 ms memakai Web Animations API. --}}
            this.animation = this.$refs.caret?.animate?.([{ opacity: 1 }, { opacity: 0 }], { duration: 1000, iterations: Infinity, easing: 'steps(2, jump-none)' });
            {{-- Ketik satu huruf, jeda di kata penuh, hapus, lalu pindah ke kata berikutnya. --}}
            const step = () => {
                const chars = list[index];
                let delay = deleting ? @js((int) $deleteSpeed) : @js((int) $typeSpeed);
                if (! deleting && count >= chars.length) {
                    if (! @js((bool) $loop) && index === list.length - 1) return;
                    deleting = true;
                    delay = @js((int) $pause);
                } else if (deleting && count === 0) {
                    deleting = false;
                    index = (index + 1) % list.length;
                } else {
                    count += deleting ? -1 : 1;
                    this.text = chars.slice(0, count).join('');
                }
                this.timer = setTimeout(step, delay);
            };
            const toggle = (visible) => {
                clearTimeout(this.timer);
                if (visible) step();
            };
            if (typeof IntersectionObserver === 'undefined') return toggle(true);
            this.observer = new IntersectionObserver((entries) => toggle(entries.some((entry) => entry.isIntersecting)));
            this.observer.observe(this.$el);
        },
        destroy() {
            this.observer?.disconnect();
            clearTimeout(this.timer);
            this.animation?.cancel();
        },
    }"
    {{ $attributes->class([$root]) }}
><span class="sr-only">{{ implode(', ', $words) }}</span><span aria-hidden="true" x-text="text">{{ $words[0] ?? '' }}</span>@if ($cursor)<span x-ref="caret" aria-hidden="true" class="{{ $caret }}"></span>@endif</span>
```

```blade
<h1 class="text-4xl font-semibold">
    Build interfaces for
    <x-markas.typing-text :words="['Laravel', 'React', 'Vue']" />
</h1>
<x-markas.typing-text :words="['pnpm dlx markasui add marquee']" :loop="false" />
```

### React

Save at `src/components/markas/TypingText.tsx`. No extra dependencies.

```tsx
"use client";

import { useEffect, useRef, useState, type ComponentProps } from "react";

const root = "inline";
const caret = "ml-0.5 inline-block h-[1.1em] w-0.5 bg-current align-[-0.2em]";

const cx = (...c: (string | false | null | undefined)[]) =>
  c.filter(Boolean).join(" ");

const reducedMotion = () =>
  typeof matchMedia === "function" &&
  matchMedia("(prefers-reduced-motion: reduce)").matches;

/** Panggil `callback(true/false)` setiap kali elemen masuk atau keluar layar. Mengembalikan fungsi pelepas. */
function onVisibility(element: Element, callback: (visible: boolean) => void) {
  if (typeof IntersectionObserver === "undefined") {
    callback(true);
    return () => {};
  }
  const observer = new IntersectionObserver((entries) =>
    callback(entries.some((entry) => entry.isIntersecting)),
  );
  observer.observe(element);
  return () => observer.disconnect();
}

/** Kursor berkedip setiap 500 ms memakai Web Animations API. */
function blink(element: HTMLElement | null) {
  return element?.animate?.([{ opacity: 1 }, { opacity: 0 }], {
    duration: 1000,
    iterations: Infinity,
    easing: "steps(2, jump-none)",
  });
}

const WORD_SEPARATOR = "\n";

export type TypingTextProps = Omit<ComponentProps<"span">, "children"> & {
  words: string[];
  typeSpeed?: number;
  deleteSpeed?: number;
  pause?: number;
  loop?: boolean;
  cursor?: boolean;
};

export function TypingText({
  words,
  typeSpeed = 70,
  deleteSpeed = 40,
  pause = 1800,
  loop = true,
  cursor = true,
  className,
  ...props
}: TypingTextProps) {
  const rootRef = useRef<HTMLSpanElement>(null);
  const caretRef = useRef<HTMLSpanElement>(null);
  const [text, setText] = useState(words[0] ?? "");
  const key = words.join(WORD_SEPARATOR);

  useEffect(() => {
    const list = key.split(WORD_SEPARATOR).map((word) => Array.from(word));
    const element = rootRef.current;
    if (!element || !key || reducedMotion()) return;

    let index = 0;
    let count = list[0]?.length ?? 0;
    let deleting = false;
    let timer: ReturnType<typeof setTimeout> | undefined;
    const animation = blink(caretRef.current);

    // Ketik satu huruf, jeda di kata penuh, hapus, lalu pindah ke kata berikutnya.
    const step = () => {
      const chars = list[index] ?? [];
      let delay = deleting ? deleteSpeed : typeSpeed;
      if (!deleting && count >= chars.length) {
        if (!loop && index === list.length - 1) return;
        deleting = true;
        delay = pause;
      } else if (deleting && count === 0) {
        deleting = false;
        index = (index + 1) % list.length;
      } else {
        count += deleting ? -1 : 1;
        setText(chars.slice(0, count).join(""));
      }
      timer = setTimeout(step, delay);
    };

    setText(list[0]?.join("") ?? "");
    const stop = onVisibility(element, (visible) => {
      clearTimeout(timer);
      if (visible) step();
    });
    return () => {
      stop();
      clearTimeout(timer);
      animation?.cancel();
    };
  }, [key, typeSpeed, deleteSpeed, pause, loop, cursor]);

  return (
    <span ref={rootRef} {...props} className={cx(root, className)}>
      <span className="sr-only">{words.join(", ")}</span>
      <span aria-hidden="true">{text}</span>
      {cursor && <span ref={caretRef} aria-hidden="true" className={caret} />}
    </span>
  );
}
```

```tsx
import { TypingText } from "@/components/markas/TypingText";

<h1 className="text-4xl font-semibold">
  Build interfaces for <TypingText words={["Laravel", "React", "Vue"]} />
</h1>
<TypingText words={["pnpm dlx markasui add marquee"]} loop={false} />
```

### Vue

Save at `src/components/markas/TypingText.vue`. No extra dependencies.

```vue
<script setup lang="ts">
import { onBeforeUnmount, onMounted, ref, useTemplateRef, watch } from "vue";

const props = withDefaults(
  defineProps<{
    words: string[];
    typeSpeed?: number;
    deleteSpeed?: number;
    pause?: number;
    loop?: boolean;
    cursor?: boolean;
  }>(),
  { typeSpeed: 70, deleteSpeed: 40, pause: 1800, loop: true, cursor: true },
);

const root = "inline";
const caret = "ml-0.5 inline-block h-[1.1em] w-0.5 bg-current align-[-0.2em]";

const reducedMotion = () =>
  typeof matchMedia === "function" &&
  matchMedia("(prefers-reduced-motion: reduce)").matches;

/** Panggil `callback(true/false)` setiap kali elemen masuk atau keluar layar. Mengembalikan fungsi pelepas. */
function onVisibility(element: Element, callback: (visible: boolean) => void) {
  if (typeof IntersectionObserver === "undefined") {
    callback(true);
    return () => {};
  }
  const observer = new IntersectionObserver((entries) =>
    callback(entries.some((entry) => entry.isIntersecting)),
  );
  observer.observe(element);
  return () => observer.disconnect();
}

/** Kursor berkedip setiap 500 ms memakai Web Animations API. */
function blink(element: HTMLElement | null) {
  return element?.animate?.([{ opacity: 1 }, { opacity: 0 }], {
    duration: 1000,
    iterations: Infinity,
    easing: "steps(2, jump-none)",
  });
}

const rootEl = useTemplateRef<HTMLSpanElement>("rootRef");
const caretEl = useTemplateRef<HTMLSpanElement>("caretRef");
const text = ref(props.words[0] ?? "");
let cleanup = () => {};

function start() {
  cleanup();
  const list = props.words.map((word) => Array.from(word));
  text.value = list[0]?.join("") ?? "";
  const element = rootEl.value;
  if (!element || list.length === 0 || reducedMotion()) return;

  let index = 0;
  let count = list[0]?.length ?? 0;
  let deleting = false;
  let timer: ReturnType<typeof setTimeout> | undefined;
  const animation = blink(caretEl.value);

  // Ketik satu huruf, jeda di kata penuh, hapus, lalu pindah ke kata berikutnya.
  const step = () => {
    const chars = list[index] ?? [];
    let delay = deleting ? props.deleteSpeed : props.typeSpeed;
    if (!deleting && count >= chars.length) {
      if (!props.loop && index === list.length - 1) return;
      deleting = true;
      delay = props.pause;
    } else if (deleting && count === 0) {
      deleting = false;
      index = (index + 1) % list.length;
    } else {
      count += deleting ? -1 : 1;
      text.value = chars.slice(0, count).join("");
    }
    timer = setTimeout(step, delay);
  };

  const stop = onVisibility(element, (visible) => {
    clearTimeout(timer);
    if (visible) step();
  });
  cleanup = () => {
    stop();
    clearTimeout(timer);
    animation?.cancel();
  };
}

onMounted(start);
watch(
  () => [
    props.words.join("\n"),
    props.typeSpeed,
    props.deleteSpeed,
    props.pause,
    props.loop,
    props.cursor,
  ],
  start,
  { flush: "post" },
);
onBeforeUnmount(() => cleanup());
</script>

<template>
  <span ref="rootRef" :class="root"
    ><span class="sr-only">{{ props.words.join(", ") }}</span
    ><span aria-hidden="true">{{ text }}</span
    ><span
      v-if="props.cursor"
      ref="caretRef"
      aria-hidden="true"
      :class="caret"
    ></span
  ></span>
</template>
```

```vue
<template>
  <h1 class="text-4xl font-semibold">
    Build interfaces for
    <TypingText :words="['Laravel', 'React', 'Vue']" />
  </h1>
  <TypingText :words="['pnpm dlx markasui add marquee']" :loop="false" />
</template>
```

### Svelte

Save at `src/lib/components/markas/TypingText.svelte`. No extra dependencies.

```svelte
<script lang="ts">
  import type { HTMLAttributes } from "svelte/elements";

  const root = "inline";
  const caret = "ml-0.5 inline-block h-[1.1em] w-0.5 bg-current align-[-0.2em]";

  const WORD_SEPARATOR = "\n";

  const reducedMotion = () =>
    typeof matchMedia === "function" &&
    matchMedia("(prefers-reduced-motion: reduce)").matches;

  /** Calls `callback(true/false)` whenever the element enters or leaves the screen. Returns a stop function. */
  function onVisibility(
    element: Element,
    callback: (visible: boolean) => void,
  ) {
    if (typeof IntersectionObserver === "undefined") {
      callback(true);
      return () => {};
    }
    const observer = new IntersectionObserver((entries) =>
      callback(entries.some((entry) => entry.isIntersecting)),
    );
    observer.observe(element);
    return () => observer.disconnect();
  }

  /** The caret blinks every 500 ms with the Web Animations API. */
  function blink(element: HTMLElement | undefined) {
    return element?.animate?.([{ opacity: 1 }, { opacity: 0 }], {
      duration: 1000,
      iterations: Infinity,
      easing: "steps(2, jump-none)",
    });
  }

  type Props = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
    words: string[];
    typeSpeed?: number;
    deleteSpeed?: number;
    pause?: number;
    loop?: boolean;
    cursor?: boolean;
  };

  let {
    words,
    typeSpeed = 70,
    deleteSpeed = 40,
    pause = 1800,
    loop = true,
    cursor = true,
    class: className,
    ...rest
  }: Props = $props();

  let element = $state<HTMLSpanElement>();
  let caretElement = $state<HTMLSpanElement>();
  // The typed text; until the animation starts, the first word.
  let typed = $state<string>();
  const key = $derived(words.join(WORD_SEPARATOR));

  $effect(() => {
    // Read every prop up front so the effect reruns when one changes.
    const options = { typeSpeed, deleteSpeed, pause, loop, cursor };
    const list = key.split(WORD_SEPARATOR).map((word) => Array.from(word));
    const caretNode = caretElement;
    typed = undefined;
    if (!element || !key || reducedMotion()) return;

    let index = 0;
    let count = list[0]?.length ?? 0;
    let deleting = false;
    let timer: ReturnType<typeof setTimeout> | undefined;
    const animation = options.cursor ? blink(caretNode) : undefined;

    // Type one letter, pause on the full word, delete it, then move to the next word.
    const step = () => {
      const chars = list[index] ?? [];
      let delay = deleting ? options.deleteSpeed : options.typeSpeed;
      if (!deleting && count >= chars.length) {
        if (!options.loop && index === list.length - 1) return;
        deleting = true;
        delay = options.pause;
      } else if (deleting && count === 0) {
        deleting = false;
        index = (index + 1) % list.length;
      } else {
        count += deleting ? -1 : 1;
        typed = chars.slice(0, count).join("");
      }
      timer = setTimeout(step, delay);
    };

    const stop = onVisibility(element, (visible) => {
      clearTimeout(timer);
      if (visible) step();
    });
    return () => {
      stop();
      clearTimeout(timer);
      animation?.cancel();
    };
  });
</script>

<span bind:this={element} {...rest} class={[root, className]}
  ><span class="sr-only">{words.join(", ")}</span><span aria-hidden="true"
    >{typed ?? words[0] ?? ""}</span
  >{#if cursor}<span bind:this={caretElement} aria-hidden="true" class={caret}
    ></span>{/if}</span
>
```

```svelte
<script lang="ts">
  import TypingText from "$lib/components/markas/TypingText.svelte";
</script>

<h1 class="text-4xl font-semibold">
  Build interfaces for <TypingText words={["Laravel", "React", "Vue"]} />
</h1>
<TypingText words={["pnpm dlx markasui add marquee"]} loop={false} />
```

### Astro

Save at `src/components/markas/TypingText.astro`. No extra dependencies.

```astro
---
import type { HTMLAttributes } from "astro/types";

const root = "inline";
const caret = "ml-0.5 inline-block h-[1.1em] w-0.5 bg-current align-[-0.2em]";

type Props = Omit<HTMLAttributes<"span">, "children"> & {
  words: string[];
  typeSpeed?: number;
  deleteSpeed?: number;
  pause?: number;
  loop?: boolean;
  cursor?: boolean;
};

const {
  words,
  typeSpeed = 70,
  deleteSpeed = 40,
  pause = 1800,
  loop = true,
  cursor = true,
  class: className,
  ...rest
} = Astro.props;
---

<markas-typing-text class="contents" data-words={JSON.stringify(words)} data-type-speed={typeSpeed} data-delete-speed={deleteSpeed} data-pause={pause} data-loop={String(loop)}><span {...rest} class:list={[root, className]}><span class="sr-only">{words.join(", ")}</span><span aria-hidden="true" data-markas-typed>{words[0] ?? ""}</span>{cursor && <span aria-hidden="true" data-markas-caret class={caret} />}</span></markas-typing-text>

<script>
  const reducedMotion = () =>
    typeof matchMedia === "function" &&
    matchMedia("(prefers-reduced-motion: reduce)").matches;

  /** Calls `callback(true/false)` whenever the element enters or leaves the screen. Returns a stop function. */
  function onVisibility(element: Element, callback: (visible: boolean) => void) {
    if (typeof IntersectionObserver === "undefined") {
      callback(true);
      return () => {};
    }
    const observer = new IntersectionObserver((entries) =>
      callback(entries.some((entry) => entry.isIntersecting)),
    );
    observer.observe(element);
    return () => observer.disconnect();
  }

  // One element per instance: setup runs for markup added later and after view transitions.
  class MarkasTypingText extends HTMLElement {
    private cleanup = () => {};

    connectedCallback() {
      const element = this.firstElementChild;
      const output = this.querySelector<HTMLElement>("[data-markas-typed]");
      const list = (JSON.parse(this.dataset.words ?? "[]") as string[]).map(
        (word) => Array.from(word),
      );
      if (!element || !output || list.length === 0 || reducedMotion()) return;
      const typeSpeed = Number(this.dataset.typeSpeed);
      const deleteSpeed = Number(this.dataset.deleteSpeed);
      const pause = Number(this.dataset.pause);
      const loop = this.dataset.loop !== "false";

      let index = 0;
      let count = list[0]?.length ?? 0;
      let deleting = false;
      let timer: ReturnType<typeof setTimeout> | undefined;
      // The caret blinks every 500 ms with the Web Animations API.
      const animation = this.querySelector<HTMLElement>(
        "[data-markas-caret]",
      )?.animate?.([{ opacity: 1 }, { opacity: 0 }], {
        duration: 1000,
        iterations: Infinity,
        easing: "steps(2, jump-none)",
      });

      // Type one letter, pause on the full word, delete it, then move to the next word.
      const step = () => {
        const chars = list[index] ?? [];
        let delay = deleting ? deleteSpeed : typeSpeed;
        if (!deleting && count >= chars.length) {
          if (!loop && index === list.length - 1) return;
          deleting = true;
          delay = pause;
        } else if (deleting && count === 0) {
          deleting = false;
          index = (index + 1) % list.length;
        } else {
          count += deleting ? -1 : 1;
          output.textContent = chars.slice(0, count).join("");
        }
        timer = setTimeout(step, delay);
      };

      const stop = onVisibility(element, (visible) => {
        clearTimeout(timer);
        if (visible) step();
      });
      this.cleanup = () => {
        stop();
        clearTimeout(timer);
        animation?.cancel();
      };
    }

    disconnectedCallback() {
      this.cleanup();
    }
  }

  if (!customElements.get("markas-typing-text"))
    customElements.define("markas-typing-text", MarkasTypingText);
</script>
```

```astro
---
import TypingText from "@/components/markas/TypingText.astro";
---

<h1 class="text-4xl font-semibold">
  Build interfaces for <TypingText words={["Laravel", "React", "Vue"]} />
</h1>
<TypingText words={["pnpm dlx markasui add marquee"]} loop={false} />
```

### Angular

Save at `src/app/markas/typing-text.component.ts`. No extra dependencies.

```ts
import {
  afterRenderEffect,
  booleanAttribute,
  ChangeDetectionStrategy,
  Component,
  computed,
  ElementRef,
  inject,
  input,
  linkedSignal,
  numberAttribute,
  viewChild,
} from "@angular/core";

const root = "inline";
const caret = "ml-0.5 inline-block h-[1.1em] w-0.5 bg-current align-[-0.2em]";

const reducedMotion = () =>
  typeof matchMedia === "function" &&
  matchMedia("(prefers-reduced-motion: reduce)").matches;

/** Calls `callback(true/false)` whenever the element enters or leaves the screen. Returns a stop function. */
function onVisibility(element: Element, callback: (visible: boolean) => void) {
  if (typeof IntersectionObserver === "undefined") {
    callback(true);
    return () => {};
  }
  const observer = new IntersectionObserver((entries) =>
    callback(entries.some((entry) => entry.isIntersecting)),
  );
  observer.observe(element);
  return () => observer.disconnect();
}

type TypingOptions = {
  words: string[];
  typeSpeed: number;
  deleteSpeed: number;
  pause: number;
  loop: boolean;
};

/** Type one letter, pause on the full word, delete it, then move to the next word. Returns a stop function. */
function startTyping(
  element: HTMLElement,
  caretElement: HTMLElement | undefined,
  options: TypingOptions,
  write: (text: string) => void,
) {
  const list = options.words.map((word) => Array.from(word));
  let index = 0;
  let count = list[0]?.length ?? 0;
  let deleting = false;
  let timer: ReturnType<typeof setTimeout> | undefined;
  // The caret blinks every 500 ms with the Web Animations API.
  const animation = caretElement?.animate?.([{ opacity: 1 }, { opacity: 0 }], {
    duration: 1000,
    iterations: Infinity,
    easing: "steps(2, jump-none)",
  });

  const step = () => {
    const chars = list[index] ?? [];
    let delay = deleting ? options.deleteSpeed : options.typeSpeed;
    if (!deleting && count >= chars.length) {
      if (!options.loop && index === list.length - 1) return;
      deleting = true;
      delay = options.pause;
    } else if (deleting && count === 0) {
      deleting = false;
      index = (index + 1) % list.length;
    } else {
      count += deleting ? -1 : 1;
      write(chars.slice(0, count).join(""));
    }
    timer = setTimeout(step, delay);
  };

  const stop = onVisibility(element, (visible) => {
    clearTimeout(timer);
    if (visible) step();
  });
  return () => {
    stop();
    clearTimeout(timer);
    animation?.cancel();
  };
}

/** Attribute selector on a span, so the user's class and aria-* stay on the root. */
@Component({
  selector: "span[markas-typing-text]",
  changeDetection: ChangeDetectionStrategy.OnPush,
  host: { "[class]": "root" },
  template: `<span class="sr-only">{{ label() }}</span
    ><span aria-hidden="true">{{ typed() }}</span>
    @if (cursor()) {
      <span #caretEl aria-hidden="true" [class]="caret"></span>
    }`,
})
export class TypingText {
  readonly words = input.required<string[]>();
  readonly typeSpeed = input(70, { transform: numberAttribute });
  readonly deleteSpeed = input(40, { transform: numberAttribute });
  readonly pause = input(1800, { transform: numberAttribute });
  readonly loop = input(true, { transform: booleanAttribute });
  readonly cursor = input(true, { transform: booleanAttribute });

  protected readonly root = root;
  protected readonly caret = caret;
  protected readonly label = computed(() => this.words().join(", "));
  /** The typed text. It goes back to the first word when the words change. */
  protected readonly typed = linkedSignal(() => this.words()[0] ?? "");
  private readonly caretEl = viewChild<ElementRef<HTMLElement>>("caretEl");
  private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);

  constructor() {
    afterRenderEffect((onCleanup) => {
      const options = {
        words: this.words(),
        typeSpeed: this.typeSpeed(),
        deleteSpeed: this.deleteSpeed(),
        pause: this.pause(),
        loop: this.loop(),
      };
      const caretElement = this.caretEl()?.nativeElement;
      if (options.words.length === 0 || reducedMotion()) return;
      onCleanup(
        startTyping(this.host.nativeElement, caretElement, options, (text) =>
          this.typed.set(text),
        ),
      );
    });
  }
}
```

```ts
import { Component } from "@angular/core";
import { TypingText } from "./markas/typing-text.component";

@Component({
  selector: "app-hero",
  imports: [TypingText],
  template: `
    <h1 class="text-4xl font-semibold">
      Build interfaces for
      <span markas-typing-text [words]="stacks"></span>
    </h1>
    <span markas-typing-text [words]="command" [loop]="false"></span>
  `,
})
export class Hero {
  protected readonly stacks = ["Laravel", "React", "Vue"];
  protected readonly command = ["pnpm dlx markasui add marquee"];
}
```

Angular uses an attribute selector on a span: `<span markas-typing-text>`.

## Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `words` | `string[]` | - | Words or phrases typed in turn. The first one is shown before the animation starts. |
| `typeSpeed` | `number` | 70 | Milliseconds per typed character. |
| `deleteSpeed` | `number` | 40 | Milliseconds per deleted character. |
| `pause` | `number` | 1800 | Milliseconds a full word stays before it is deleted. |
| `loop` | `boolean` | true | Start again after the last word. When false, the last word stays. |
| `cursor` | `boolean` | true | Show the blinking cursor after the text. |

## Accessibility

- Screen readers read all words once from a visually hidden copy, joined with commas; the typed text and cursor are aria-hidden.
- The animation pauses when the text is off screen.
- With reduced motion, the first word is shown in full and the cursor does not blink.

## Notes

- The first word is rendered on the server. The animation starts by pausing on it, then deletes it and types the next one.
- The loop pauses while the text is off screen. The Blade version needs Alpine.js.
- Screen readers hear every word once, joined with commas, instead of each typed letter.
- With reduced motion, the first word stays and the cursor does not blink.
