Adding animation to the collapsible tabs

Solved

Adding animation to the collapsible tabs

technase
Shopify Partner
221 2 54

I need help with changing the animation of the collapsible tabs when hovered over. I'd like the animation to match the style of the main menu in the header. Attaching screenshot for reference. 

 

Link: https://testingstoresandthemes.myshopify.com/
storefront password: 12345

 

Any help is greatly appreciated 

screencapture-testingstoresandthemes-myshopify-2024-10-23-22_58_16.png

 

 

 

technase
Accepted Solutions (2)

Sweans
Shopify Partner
429 89 128

This is an accepted solution.

Hi @technase,

 

Please add the below css code to your theme stylesheet.

 

.accordion__title.inline-richtext.h4::after {
  content: "";
  height: 2px;
  width: 0;
  background-color: currentColor;
  position: absolute;
  bottom: 0;
  left: 0;
  -webkit-transition: width .45s;
  transition: width .45s;
}
.collapsible-content summary:hover .accordion__title {
  text-decoration: none;
}
.accordion summary:hover .accordion__title.inline-richtext.h4::after {
  width: 100%;
}

 

I hope this helps! If it does, please like it and mark it as a solution! 

If you need further assistance, feel free to reach out!

Regards,
Sweans

- Was my reply helpful? Please Like and Accept the Solution or let me know by Buying me coffee!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me at info@sweans.com regarding any help.
- To know more about me check out www.sweans.com

View solution in original post

Sweans
Shopify Partner
429 89 128

This is an accepted solution.

Hi @technase,

Yes, it's possible.

Just add the below CSS code too.

.accordion__title {
position: relative;
}

Sweans_0-1729766229717.png

I hope this helps! If it does, please like it and mark it as a solution!
If you need further assistance, feel free to reach out!

Regards,
Sweans


 

- Was my reply helpful? Please Like and Accept the Solution or let me know by Buying me coffee!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me at info@sweans.com regarding any help.
- To know more about me check out www.sweans.com

View solution in original post

Replies 4 (4)

Sweans
Shopify Partner
429 89 128

This is an accepted solution.

Hi @technase,

 

Please add the below css code to your theme stylesheet.

 

.accordion__title.inline-richtext.h4::after {
  content: "";
  height: 2px;
  width: 0;
  background-color: currentColor;
  position: absolute;
  bottom: 0;
  left: 0;
  -webkit-transition: width .45s;
  transition: width .45s;
}
.collapsible-content summary:hover .accordion__title {
  text-decoration: none;
}
.accordion summary:hover .accordion__title.inline-richtext.h4::after {
  width: 100%;
}

 

I hope this helps! If it does, please like it and mark it as a solution! 

If you need further assistance, feel free to reach out!

Regards,
Sweans

- Was my reply helpful? Please Like and Accept the Solution or let me know by Buying me coffee!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me at info@sweans.com regarding any help.
- To know more about me check out www.sweans.com

technase
Shopify Partner
221 2 54

Thank you so much, 
Is there a way to apply the animation only to the text, rather than the entire row?

 
technase
Sweans
Shopify Partner
429 89 128

This is an accepted solution.

Hi @technase,

Yes, it's possible.

Just add the below CSS code too.

.accordion__title {
position: relative;
}

Sweans_0-1729766229717.png

I hope this helps! If it does, please like it and mark it as a solution!
If you need further assistance, feel free to reach out!

Regards,
Sweans


 

- Was my reply helpful? Please Like and Accept the Solution or let me know by Buying me coffee!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me at info@sweans.com regarding any help.
- To know more about me check out www.sweans.com

technase
Shopify Partner
221 2 54

perfect. Thank you. 

technase