skyline / component-sticky
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:CSS
Requires
- php: ^7.2
- skyline/component-jquery: ^3
Requires (Dev)
- phpunit/phpunit: ^6
- skyline/compiler: dev-master
This package is auto-updated.
Last update: 2024-12-14 01:07:20 UTC
README
The Sticky Component of Skyline ships with css and javascript addons to fix elements on top or bottom of a page.
Install
$ composer require skyline/component-sticky
and require it in your templates using the @require Sticky
annotation tag.
After that, there are 3 css classes available:
-
sticky-fixed
Fixes an element at top of the page. -
sticky-bottom
Fixes an element at bottom of the page. -
sticky-flexible
A flexible content that should be extended until bottom element.
Additional an element with the class sticky-fixed
is allowed to specify animation attributes:
-
data-role="hold-top"
Observes the window for scroll events. If the window passes a scroll position, the given css class is added, or removed otherwise. -
data-offset
If the scroll position of the window reaches the top edge plus offset of the element, the class is added. -
data-toggle-class
The css class name to add or remove.