Skip to content

zk-sticky ​

An element that stays in view while scrolling.

Props ​

PropTypeDefaultDescription
edgestring'top'top or bottom: data-edge
asstring'div'Root element
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Slots ​

SlotDescription
defaultContent

It carries data-sticky and data-edge: write position: sticky in your style ([data-sticky][data-edge="top"] { top: 0 }). No script.

Examples ​

blade
<x-zk-sticky as="header">...</x-zk-sticky>

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.