ENGLISH·COURSE API
    Preparing search index...
    • A number that climbs from zero to target, for counts that should feel earned.

      Parameters

      • target: number

        The value the count ends on

      Returns number

      The value to show on this frame

      The climb eases out over COUNT_UP_DURATION_MS on animation frames. Under prefers-reduced-motion: reduce, or where the preference cannot be read, the hook returns target from the first render.

      The value is for eyes only: a caller SHALL render it hidden from assistive technology beside the final sentence, so a screen reader never announces a number on its way up.

      Browser-side only — do NOT call from a Server Component.

      const shown = useCountUp(ticketsEarned);
      return (
      <p>
      <span aria-hidden="true">{shown}</span>
      <span className="sr-only">{t("ticketCount", { earned: ticketsEarned })}</span>
      </p>
      );