When you create an XD design, sometimes an artboard is not long enough to fit your content. By making an artboard longer and choosing options based on your design needs, you can vertically scroll an artboard to accommodate different device sizes.
Vertical scrolling helps you simulate scroll effects when designing scrollable drop-down lists or websites, however, horizontal scrolling is not supported in XD.
Anchor links help you with better navigation experience when working with your prototypes, especially when designing a single page website. With just a tap, you can scroll from one section of an artboard to another.
In the Design mode, select the following options in the Property Inspector:
- Scrolling: Select Vertical or None.
- Fix position when scrolling: Select to pin the elements to a fixed position to avoid scrolling with the content.
- Viewport Height: Specify the viewport height through which you can view the artboard.
In the Prototype mode, select the following options in the Property Inspector:
- Preserve scroll position: Transitions to the next artboard while maintaining the position from the previous artboard. Check out this Twitter post for more details.
- Fix position when scrolling: Pins the design elements to a fixed position to avoid scrolling with the content.
In Prototype mode, select the object that you want to add an anchor link to. Drag the wire on that object for which you want to trigger Scroll To as an action. Have a look at the Interaction panel that appears in Property Inspector:
- Trigger: Set to Tap automatically.
- Action: Set to Scroll To automatically. If you want to assign two actions on a single trigger such as Tap, set the first Action + button in the Property Inspector to Scroll To , and set the second Action + button to a non-transitional action such as Audio playback or Speech playback.
- Destination: The object that you dropped the wire on is set as the layer in the destination drop-down. However, you can choose to select a different layer from the list.
- -offset: Enter the y-offset value that is relative to the top of the wired object. Any value above the wired object is a negative offset and below is a positive offset. You can choose to change the y-offset by dragging the y-offset handle to the left of the artboard.
- Easing: Select an option to simulate easing effects.
- Duration: Enter the time duration. The maximum duration you can set between two transitioning artboards is five seconds.
Want to work with preset artboards to create a vertical scrollable drop-down list?
- Use the Select tool to click the artboard name or drag across artboards. You can also click an artboard name in the Layers panel to select it in the Document window.
- To make the selected artboard longer, drag the bottom point of the artboard down. A dotted line indicates the original height of the artboard.
- To preview scrolling on an artboard, you can preview directly in XD using the Desktop Preview option.
Do download the sample files and try them yourself or watch this video for more information.
Viewing time: 1 minute.
You can also check out the XD community for more such tutorials and sample files.
XD does not support horizontal scrolling; as a workaround, you can use auto-animate with a drag trigger to simulate horizontal scrolling:
- Group the elements you want to horizontally scroll in the artboard and duplicate the same artboard.
- In the new artboard, copy and move the group of elements to its final position in the scroll.
- Wire the prototypes and switch the trigger from Tap to Drag and action to Auto-Animate.
- Drag the preview window to view the mimicked horizontal scroll effect.
“Sticky headers and other fixed elements are like signs on a highway — way finders to ensure we’re continuing to provide relevant information to a corresponding section or aiding customers along their journey via calls to action.” Says Oliver Lindberg. Check out the blog on best practices for designing sticky headers and other fixed elements.