fun-header-controller

Component that switches content depending on the scroll position, for creating dynamic page headers.

Use together with the fun-fixed-header to create a dynamic page header that switches appearance and component depending on scroll state. A larger, inline header is switched to a smaller fixed header when the user scrolls, keeping the header and key actions in view at all times.

Sroll in our example pages to see how we recommend implementing the fun-header-controller.

Scroll in this box to see the component in action.

The examples below do not work as you’d expect as they are embedded in this page; see above for a proper working example.

Examples

Specifications

Properties

PropertyAttributeRequiredDescriptionTypeDefault
breakpointbreakpointfalseThe Y scroll value to switch content onnumber100

Slots

NameDescription
defaultthe content to be shown when scroll is less than breakpoint
scrolledthe content to be shown when scroll is more than breakpoint

Dependencies

This documentation page generated from the source at fun-header-controller.tsx

Search Gunnel

Powered byAlgolia