LogoLogo
Quest HomeSign Up
  • 😀Welcome to Quest
  • Getting Started
    • Quest Overview
    • Helpful Resources
    • Quick Start - Build your first component from Figma
    • Quick Start - Build your first component from a Wireframe
    • AI Prompt
  • Fundamentals
    • Customizing & Using the UI Kit
    • Designing Custom Components in Figma
    • Easily Sync Designs without Losing Work
    • Setting Up Props & Bindings
    • Exporting Code
    • Push to your Repository
    • Creating Responsive Components
    • Nesting Components
    • Workspaces & Apps
    • Code & Preview Mode
    • Prototypes/Wireframes
    • Animations - build with React Spring
    • Quest plugin for Figma Dev Mode
    • Publish on Quest to a URL
  • Features
    • Working with Variants & States
    • Naming Conventions
    • Previewing with Custom Fonts
    • Light & Dark Mode
    • Creating a custom Tooltip
    • Creating a Floating Popover
    • Creating a Dialog pop-up
    • Radio Group
    • Using the MUI Data Grid & Table
    • Data & List Bindings
    • Dynamic Bindings
    • Grid
    • File Upload
    • Design System Tab and Theme Import
    • How-to use a Theme in your Application
    • Accessibility Support
    • Design Tips and Tricks
    • Video
    • Lazy Loading
    • Sticky Position
    • Link
    • Custom Breakpoints
    • Min / Max Width
    • Supported Quest UI Kit Components & How-to Make Edits in Figma
    • Supported Chakra Components & How-to Make Edits in Figma
  • Advanced Tutorials
    • Setting up Bindings and Features on the MUI Button
    • Display Repeating Components based on a Dynamic List
    • How-to Pass Values from Parent to Nested Components
    • How-to Invoke a modal Dialog Box from a Button Click
    • How to Setup a popover
  • 🔍Help
    • Product Updates
    • FAQs
    • Plugin Warnings / Alerts
  • 💡Support
    • Why does my design look different in Quest than Figma?
    • Can I keep making changes in Figma without affecting code?
    • What are some best practices?
    • Does Quest support more than Figma and React?
    • How do I manage users?
    • What is the refund process?
    • How do I get in touch with Quest?
    • Do I have to use MUI if I'm using Quest?
Powered by GitBook
On this page
  • How it works
  • Feature Options

Was this helpful?

  1. Features

Sticky Position

PreviousLazy LoadingNextLink

Last updated 2 years ago

Was this helpful?

The Stick Position feature is the ideal way to add a sticky navbar to the top of your webpage. It's great also for setting up things like a sticky navigation in a sidebar as you scroll through a product page.

How it works

You can use this feature on anything on your page with the understanding that the element you choose to use it on will be sticky to the parent container in relation to the top of the browser.

This won’t work:

Assigning Sticky to a top-level element

In this instance, you want a navbar to be stuck to the top of the screen and the "navbar" element is at the top-level of the layers in Figma.

Assigning Sticky to a child of a container

In this instance, you may have a 4000px tall "Sidebar holder" container and if you choose to add sticky top to it's child ("sidebar links") that child will stick to the top of that container as you scroll. As long as the "Sidebar holder" is in view in the browser, the child will be at the top of it in the browser view. If you scroll past it, the child will move out of view with the parent and no longer be stuck to the browser's top.

If the parent container of the sticky element is the same size as the element you're applying it to, you will not see any difference as you scroll.

Feature Options

The feature has 2 different toggles. You can choose where to stick things (top or bottom) and how they are layered in relation to other elements in the component/page (above or below).

Stick to Top

Use this setting when you want things to stick to the top of the page or their container. This is great for navbars. The element with the added sticky feature must be located at the top of it's parent container for this to work best.

Stick to Bottom

Use this setting when you want things to stick to the bottom of the page. This is great for call to actions or GDPR messaging. The element with the added sticky feature must be located at the bottom of it's parent container for this to work best.

Design elements will not automatically move to from top to bottom or from bottom to top. They must be placed in their parent at the starting location for the sticky feature to work properly.

Layer Above

Use this setting to override the z-index of the element you're adding the sticky feature to. Layer Above means it will show up above all other layers in your design. This sets the z-index to 3000 behind the scenes.

Layer Below

Use this setting to override the z-index of the element you're adding the sticky feature to. Layer Below means it will show up below all other layers in your design. This sets the z-index to -3000 behind the scenes.

CSS Properties added to Sticky Elements

Stick to Top / Layer Above

{
position: "sticky";
top: 0;
z-index: 3000;
}

Stick to Top / Layer Behind

{
position: "sticky";
top: 0;
z-index: -3000;
}

Stick to Bottom / Layer Above

{
position: "sticky";
bottom: 0;
z-index: 3000;
}

Stick to Bottom / Layer Behind

{
position: "sticky";
bottom: 0;
z-index: -3000;
}

Note - Unexpected Behavior for bottom elements in Preview Mode

When in Preview Mode, if you have one or more elements that should be positioned at the bottom, there is a possibility that unexpected behavior may happen. This is a known issue and it is related to the way that the element or elements are positioned inside the iframe that Quest uses to preview the pages and components.

This unexpected behavior may also vary between browsers such as Safari and Chrome.

But don’t worry, this unexpected behavior is not present in the exported code.

Take into account that the design from Figma needs to be consistent with the desired layout. If you need an element to be on top of the page, the design from Figma into Quest must have that element naturally positioned there. Quest only will add some to the element and its container.

CSS properties