Readonly
addedClasses to set on the controlled element after the first usage of add.
Auto clears after adding with the declared duration, in milliseconds. If zero or below, will not be used.
Delay, in milliseconds, after adjusting classes before the content should be cleared.
Readonly
containerTarget element that will be used to insert the cloned elements.
Readonly
contextReadonly
hideClasses to set on the controlled element when clearing content or removed when adding content.
Optional
isInternal tracking of whether a clearing delay is in progress.
Readonly
showClasses to set on the controlled element when adding content or removed when clearing content.
Delay, in milliseconds, before adjusting classes on show.
Readonly
templateReadonly
templateStatic
blessingsStatic
classesStatic
outletsStatic
targetsStatic
valuesStatic
shouldAdds a new element to the container based on the type argument provided in the event or action params objects. Optionally clearing the container first with support for added custom text inside the added element.
Optional
event: CustomEvent<AddOptions> & { params?: AddOptions }If called with an event (or any truthy argument) reset the classes for show/hide so the this method can be used intentionally via actions allowing clearing after animations have run.
Optional
event: EventIf no type provided, return the first template target, otherwise try to find a matching target, finally fall back on the first template target if nothing is found.
Optional
type: null | stringStatic
after
Adds the ability for a controlled element to pick an element from a template and then clone that element, adding it to the container. Additionally, it will allow for clearing all previously added elements.
Example: - Using with the w-messages identifier
Example: - Using to show a temporary element with auto-clearing