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.7 , built from 7415dae on 3.2.7 by pipeline #3081600448 on 2026-11-17.