Optionalprops: TModuleProps<Retrieves the module's callbacks instance.
Indicates whether the instance has been destroyed.
After destruction, destroy is a no-op.
Letter elements from the last split.
Letter metadata from the last split.
Line elements from the last split (empty when lines is false).
Line metadata from the last split (empty when lines is false).
The name of the module, derived from the class name
Class name prefix for split elements ({corePrefix}split-text).
Current properties. Do not mutate these directly, use updateProps instead.
Word elements from the last split.
Word metadata from the last split.
Protected_addAdds prefixed classes to an element and removes them on destroy.
Skips classes that are already present on the element.
Target DOM element.
Unprefixed class name segments.
Protected_cnBuilds one or more prefixed class names.
Unprefixed class name segments.
Space-separated prefixed class string.
Protected_destroyStops listeners, unwraps lines when possible, and restores saved DOM.
Protected_emitEmits a callback event with a fixed payload.
Set default mutable props
Get default static props
Accessible label for the container after splitting.
true — uses textContent as aria-labelfalse — does not set aria-labelstring — uses the provided valueContainer whose text content is split.
Elements excluded from splitting (selector, list, or predicate).
CSS class for letter elements.
Split each word into individual letter elements.
HTML tag for letter wrappers.
CSS class for line elements.
Group words into line elements (reflows on resize).
Wrap each line in an extra element (useful for mask animations).
HTML tag for line wrappers.
CSS class for line wrapper elements.
Preprocesses text before word splitting (e.g. CJK segmentation).
Debounce delay for resize-driven line reflow (ms).
CSS class for word elements.
Delimiter used to split text into words.
Delimiter inserted between words in the DOM (defaults to wordDelimiter).
HTML tag for word wrappers.
Protected_handleMethod that is called when the module's properties mutate. In most cases, used to handle callbacks.
Adds a custom callback to the module.
The event type to listen for (e.g., 'props', 'destroy').
The function to execute when the event is triggered.
Additional settings for the callback.
Registers a function to run when the instance is destroyed.
If the instance is already destroyed, action runs immediately.
Cleanup function (for example remove listeners or DOM classes).
Splits text into words, letters, and optionally lines.
Emits beforeSplit, performs DOM work, then emits split.
Splits text in a container into words, letters, and optionally lines.
Preserves inline HTML, supports resize-driven line reflow, and restores the original DOM on destroy.
Apply
font-kerning: noneon the container to reduce layout shift.Documentation