back
Disable plugins
Disable a registered plugin
Set disabled before init(). Luge evaluates its truthiness; strings, arrays, and objects are not browser queries.
luge.settings({ transition: { disabled: true } })
Prefer omitting a plugin entirely when it is never needed. Disabled plugins receive an lg-[plugin]-disabled class on <html> and skip their initialization. This setting is evaluated at startup, not as a live toggle.
Browser conditions
Register Browser, then evaluate the condition yourself:
luge.settings({
smooth: {
disabled: luge.browser.some(['tablet', 'mobile']) ||
luge.browser.satisfies({ safari: '<=12' }),
},
cursor: { disabled: luge.browser.some(['tablet', 'mobile']) },
})
The UMD bundle supplies these conditions. Module registration does not add them automatically. Browser itself does not extend the disableable Plugin base class.
Reveal and Parallax also support their own per-element data-lg-*-disable platform attributes when Browser is registered.