Class Toggle
Available as: Web ComponentShortcodeOxygen ElementToggle CSS classes on any element in the document.
Properties
inner
Type: booleanDefault: true
If target element should be searched within component or in document.
local
Type: string
Specify a local storage item, so the toggle state will be remembered when the user visits the site again.
target
Type: stringDefault: *
Target element. Can take any querySelector value. (id, class, tag etc.)
toggle
Type: stringDefault: spx-class-toggle--active
List of classes that should be toggled.
Slots
inner
Slot (between HTML tag).
Events
spxClassToggleDidLoad
Fires after component has loaded.