I have four dropdowns inside one wrapper.
On page load, I need the first dropdown to be open by default.
I tried adding and removing the w--open class to the dropdown toggle and the dropdown list.
It works on load, but the problem is this:
when I click the dropdown for the first time, it does not close.
I want the default Webflow dropdown behavior.
First click should close it.
Second click should open it again.
This template is for the Webflow Marketplace, so I cannot use heavy custom scripts or complex logic.
Is there any way to do this using only Webflow’s default dropdown interaction?
Or is there a safe, Marketplace-approved solution for this case?
Basically custom code is your only option, because you need to simulate that initial click as a user would. That’s the only way to cleanly ensure that the internal state of the dropdown is preserved.
Since this is a template, custom code is an option, so you need to look a different direction.
There MIGHT be some custom attributes you can add to a dropdown that weblow.js will utilize. I’m not aware of any, but you should contact support, Webflow does have some useful undocumented attributes on certain element types.
Failing that, I’d ditch dropdowns and switch to something Interactions-based; you have far more control and it’s a far more professional approach especially if you can build it with IX3.
IX2 definitely can be used for this, as a backup.
I think Finsweet’s accessible components lib might have a non-dropdown-based accordion / faq, you’ll find tons in made in Webflow as well.
ALSO - can’t hurt your template approval process if you’re using the new GSAP interactions ( IX3 ).