Mockitt

Widget Scrolling Behavior

In Mockitt, you can easily control the position of elements on the page during scrolling. The available settings include Scroll with Page, Fixed to Top, Fixed to Bottom, and Sticky.

437scrolling.jpg

Setting Scroll Behavior

You can set the scroll behavior of a widget in two ways:

  1. Right-click Menu: In Edit mode, right-click the target widget, select Fixed Position, and then choose the desired type.

  2. Property Panel: Select the widget, find the Overflow option in the Appearance panel on the right, and select the type.

Scroll Types

1. Scroll with Page

When selected, the widget moves along with the page content as you scroll. It does not have a fixed position relative to the viewport.

2. Fixed to Top

The widget maintains a fixed distance from the top of the viewport, even when the page scrolls. Note: You must move the widget's layer to the very top of the current page's layer hierarchy to ensure it stays above other scrolling content.

3. Fixed to Bottom

The widget maintains a fixed distance from the bottom of the viewport, even when the page scrolls. Note: You must move the widget's layer to the very top of the current page's layer hierarchy.

4. Sticky

Sticky behavior means the element scrolls with the page until it reaches a specific position, at which point it becomes fixed.

  1. Set Sticky Position:

You can define a specific distance from the page top as the sticky threshold.

When you scroll the page and the element reaches this position, it will "stick" there.

  1. Virtual Indicator:

When you enter a value for the sticky position, a virtual ghost element will appear on the canvas to indicate where the element will stick. This virtual element is for visual reference only; it matches the size of the original element but cannot be manipulated manually on the canvas. It moves as you adjust the numerical value.

  1. Sticking and Unsticking:

Usage Example

Scenario: You have a navigation bar, and you want it to scroll with the content initially but stick to the top of the page once the user scrolls past a header.

Note: The sticky position is calculated relative to the Page, not the Fixed Region (Screen Fixed Area). By flexibly setting these behaviors, you can better control element positioning and improve the interactive experience of your prototype.