Skip to content

UseRemoveClass

katanakit-js / useRemoveClass

function useRemoveClass(target, className): void;

Defined in: infrastructure/dom/dom.service.ts:169

Removes CSS class(es) from the target element.

Parameter Type Description
target string | Element A CSS selector string or an Element instance.
className string | string[] A single class name or an array of class names to remove.

void

useRemoveClass("#header", "sticky");
useRemoveClass(myElement, ["visible", "active"]);