feat: ease-dropdown — Animated CSS-only dropdown menu component#878
Open
AjayBandiwaddar wants to merge 5 commits into
Open
feat: ease-dropdown — Animated CSS-only dropdown menu component#878AjayBandiwaddar wants to merge 5 commits into
ease-dropdown — Animated CSS-only dropdown menu component#878AjayBandiwaddar wants to merge 5 commits into
Conversation
added 5 commits
June 2, 2026 06:32
ease-dropdown — Animated CSS-only dropdown menu component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
Adds
ease-dropdown— a fully CSS-only animated floating dropdown menu component. Opens via:focus-within(zero JavaScript), closes automatically when focus leaves the trigger, and composes directly with existingease-btnvariants. Fills the navigation component gap explicitly listed as Planned v1.3 in VISION.md.Type of Change
Submission Checklist
submissions/examples/ease-dropdown/demo.html— self-contained, opens in browser with no serverstyle.css— raw CSS for the proposed featureREADME.md— what it does, how to use it, why it fits EaseMotion CSScore/components/Feature Description
What does this add?
A floating dropdown menu component with a smooth top-down entrance animation, four layout variants, and full keyboard/screen-reader accessibility — no JavaScript required.
How does a developer use it?
Why does it fit EaseMotion CSS?
.dropdown,.dropdown-trigger,.dropdown-menu,.dropdown-item-dangerread exactly like what they do, matching the framework's core philosophy.opacity 0→1+scaleY(0.94)→1withtransform-origin: top center, the same motion language asease-slide-downandease-card-hover. The.dropdown--upmodifier correctly flipstransform-origintobottom center.var(--ease-*)references carry raw fallback literals, so the component works standalone and also immediately adopts any future theme changes tocore/variables.css..ease-btn-primary,.ease-btn-ghost,.ease-btn-outline, or any custom element.:focus-within. The browser manages focus, so clicking outside dismisses the panel with no event listeners.Demo
demo.htmlworks by opening directly in a browser)The demo shows four variants:
aria-labelinstead of visible textBrowser Testing
Notes for Maintainer
Naming: Class names are intentionally left without the
ease-prefix on internals (.dropdown-menu,.dropdown-item) so you can standardize them however fits the framework best — e.g.ease-dropdown-menu,ease-menu, etc.Accessibility choices worth knowing:
aria-haspopup="menu"is on the trigger;aria-expandedis intentionally omitted since it can't be toggled without JS and a hardcodedfalsewould be misleading.role="none"on<li>elements removes the implicit list semantics sorole="menuitem"on the<a>is the sole announced role — the correct pattern per WAI-ARIA 1.2.tabindex="-1"on items prevents a double tab stop; the trigger opens the panel and Tab walks through items naturally.The chevron is a CSS
mask-imageinline SVG rather than a Unicode character — it inheritscurrentColor, scales withfont-size, and renders consistently across OSes without font-metric quirks.prefers-reduced-motionsetstransition-duration: 1mson animated elements, matching the pattern used inease-accordion.Feel free to adjust any timing values or rename classes during integration — happy to update the submission if anything needs changing before merge.