Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Typed.js

Security covered Under active development 11 sites

Part of the Typed ecosystem · 5 projects

This module integrates the Typed.js library to create animated typing effects on your site. It allows you to easily add dynamic text that appears as if it's being typed out.

Typed brings Typed.js to Drupal. It integrates the library with Drupal's asset library system, making the Typed JavaScript constructor available to themes and custom modules.

Typed.js creates typing animations by displaying text character by character, erasing it, and moving through a sequence of strings. It supports configurable typing and backspacing speeds, delays, looping, cursor display, and callbacks. Animations are initialized in JavaScript; the module does not provide a visual animation editor.

What does Typed.js do? Typed.js brings text-typing animations to Drupal. It types configured strings at your chosen speed, erases them, and cycles through the sequence—all controlled through JavaScript.

Choosing a module version

  • Typed 1.x: Supports Drupal 8.8, 9, 10, and 11. Recommended for existing sites using the stable 1.x release line.
  • Typed 2.x (beta): Targets Drupal 11.3+ and Drupal 12. Requires PHP 8.3 or later. Choose this line when preparing for Drupal 12 or using the modern integration. The 2.x release line is currently beta.

These are versions of the Drupal module, not versions of the Typed.js library. The 2.x module line supports local Typed.js v2 and v3 UMD browser builds. Its default CDN fallback uses Typed.js 2.1.0. Typed.js v3 must be installed locally. See the available releases.

Library licensing: Typed.js 2.1.0 is MIT-licensed. Typed.js 3.0.0 is GPL-3.0-or-later, and the upstream project also offers commercial licensing options. Review the applicable upstream license before using v3 in a commercial project.

Features

  • Integrates Typed.js with Drupal's asset library system.
  • Detects supported local Typed.js v2 and v3 UMD browser bundles.
  • Searches site-specific, global, and installation-profile library directories.
  • Supports three library directory aliases: typed.js, typed, and typedjs.
  • Uses deterministic library selection, prioritizing location, verified builds, and Typed.js v2 over v3 within the same location.
  • Attaches only one Typed.js library to avoid duplicate loading.
  • Falls back to a pinned Typed.js 2.1.0 CDN build with Subresource Integrity (SRI) when no supported local build is found.
  • Reports the selected library, version, license, ignored or incomplete copies, and outdated cache selections in Drupal's status report.

Installation

  1. Install a module release compatible with your Drupal version:
    • For the stable 1.x line, use composer require 'drupal/typed:^1.0'.
    • For the 2.x beta line, use composer require 'drupal/typed:^2.0@beta'.
  2. Enable the Typed module.
  3. Optionally install a local Typed.js browser bundle:

    Extract the archive and place its dist/typed.umd.js file in one of the supported library directories:

    • /libraries/typed.js/dist/typed.umd.js
    • /libraries/typed/dist/typed.umd.js
    • /libraries/typedjs/dist/typed.umd.js

    Keep the upstream package.json alongside the dist directory when available.

  4. Clear all Drupal caches after adding, replacing, or removing local library files.

A local library is optional. Without a supported local build, the module automatically falls back to Typed.js 2.1.0 from the CDN. The selected library and its status are displayed at /admin/reports/status.

Usage

Add your animation code to a JavaScript file in your theme or custom module. The library exposes the Typed constructor for initializing typing animations.

  
var typed = new Typed('.element', {
  strings: ['First sentence.', 'Second sentence.'],
  typeSpeed: 30
});

Customize the animation using Typed.js options such as strings, typeSpeed, backSpeed, backDelay, loop, and showCursor.

JavaScript integration: The module provides the library integration only. You write and initialize your animations in JavaScript using the API of the loaded Typed.js version.

Documentation and support

Similar projects

  • Textimate — text animation effects for Drupal.
  • Splitting.js — splits text into words and characters for custom visual effects.

Use typing animations thoughtfully. Keep essential content accessible without animation and respect users' reduced-motion preferences.

Drupal 8–11

Ask your assistant about Typed.js

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Oct 2023
Latest release
2 weeks ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.0-beta1 Pre-release 11 PHP >=8.3 Oct 30, 2026
2.0.x-dev Dev 11 PHP >=8.3 Oct 30, 2026
1.0.2 Stable 8–11 Jun 9, 2024
1.0.x-dev Dev 8–11 Jun 9, 2024
1.0.1 Stable 8–10 Nov 9, 2023
1.0.0 Stable 8–10 Oct 30, 2023
1.0.0-beta1 Pre-release 8–10 Oct 18, 2023