• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Creating an Add to Cart component with states, but also fixing cart icon to top when scrolling

Community Beginner ,
Aug 23, 2023 Aug 23, 2023

Copy link to clipboard

Copied

I have a dilemma...I am wanting to create an add to cart button that when clicked 'adds' to the cart in the top right corner. I figured an efficient way to do this was to make the whole thing a component with states 1-10 (I'm guessing XD doesn't have an infinity option) and then the button when clicked gets assigned to a different state each click.

Screen Shot 2023-08-24 at 10.31.48 AM.png

 

The issue now is this is a long page and I would like the menu bar at the top to be a fixed position when scrolling. But because my cart icon is connected to the add to cart button at the bottom is this possible? Or do I need to try another method. 

 

I know to create frames in XD you need to create a new artboard for each but it seems like a lot of work for just a small funtionality. If there is a better way to do this I'm all ears!

 

 

 

Thanks.

 

Views

299

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation