accessible-menu
accessible-menu copied to clipboard
Feat: Add transition timeout option
Summary
When you want to have transitions while opening and closing menus, the way we handle the transition class works fine for opening the menu, but assuming you are using display: none
when the menu is closed, the transition class does a whole lot of nothing since you can't animate display properties in css.
It would be nice to have a timeout between adding the transition class and adding the closed class while a menu is closing so you can have more control over what effects you can do in css.
Solution
add a transitionTimer
property or something along those lines to the menu that will set a timeout before adding the close classes during toggles closing.
Bonus points if we could maybe hook into css custom props so you could theoretically control that aspect through css alone if need-be.