Offset
Available as: Web ComponentShortcodeOxygen ElementThe component offsets itself to the height of a specified element. It comes in handy when dealing with a fixed header and is used on this site. Simply wrap your main content container with it and select a target element. The distance will adjust on screen resize.
Properties
target
Type: stringDefault: header
Target element. Can take any querySelector value. (id, class, tag etc.)
variable
Type: booleanDefault: true
Add offset as CSS variable to body.
Slots
inner
Slot (between HTML tag).
Events
spxOffsetDidLoad
Fires after component has loaded.
Methods
recalc
Recalculate distance.