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.
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, andtypedjs. - 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
-
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'.
- For the stable 1.x line, use
- Enable the Typed module.
-
Optionally install a local Typed.js browser bundle:
Extract the archive and place its
dist/typed.umd.jsfile 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.jsonalongside thedistdirectory when available. - 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
- Typed.js documentation and live demo
- Typed.js source code and upstream releases
- Module installation and library selection guide
- Report an issue or suggest a feature
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.
Project information
- Project categories: Developer tools, Integrations
7 sites report using this module
- Created by mahyarsbt on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Provides Drupal integration for Typed.js v2 and v3, with automatic local-library detection and a pinned CDN fallback.
Development version: 2.0.x-dev updated 30 Oct 2026 at 16:47 UTC

