--- url: /reference/items/Sticky/js-api.md --- # JS API ## Refs ### `inner` * Type: `HTMLElement` The HTML element that will be shown/hidden when scrolling. ## Options ### `zIndex` * Type: `number` * Default: `100` The value used to generate the `z-index` for all sticky elements. ### `hideWhenUp` * Type: `boolean` * Default: `false` Hides the sticky element when the user scrolls up. ### `hideWhenDown` * Type: `boolean` * Default: `false` Hides the sticky element when the user scrolls down.