Dropdown Menu
A fully accessible dropdown menu component built with Stimulus and Tailwind CSS. Supports custom triggers, menu headers, dividers, icons, and destructive actions. Features smooth scale + fade animations and full keyboard navigation.
Preview & Code
dropdown_component.rb
█ ██████████████████████ ████
█████ █████████████████
███████████ ███████ ██████
███ ██████████████████ ██████ ███
██████ █ █████
██████ █ █████
███
_dropdown.html.erb
███
████████ █████████ █████████
██████
███ ██████ ██████████████████████ ██████ ██████████ ██████ █
█ ██████ ███████ █████ ██████████ █████ ████████ ██
█ █████ ████████ ██
█ ██████ █████████ █████ ████████████ █████ ████████ ████████████ ████ █
█ ██
dropdown_controller.js
██████ █ ██████████ █ ████ ████████████████████
██████ ███████ █████ ███████ ██████████ █
██████ ███████ █ ████████ █████████
█████████ █
█████████ █ █████
█
████████ █
dropdown_component.rb
█ ██████████████████████ ████
█████ █████████████████ █ ███████████████████
█████████ █ ███████████████ ███████████ █████████ ████████████████
███████████ ████████
███████████ ███████
████████████ ███████ ███████████████
████████████ ██████████ ██████████████████
dropdown_component.html.erb
████ ██████████████████████████
█████████████████████████████████████████ ██████████████████████████████████████████████
███████████████ ████████████ ███████████
███ ████████ ██████ ████ ██ ███████ ██████ ██
██ ██ ████████ ██
███████ █████████████████████████████
█████████████████████████████
█████████████
██████████ ███████████████ ███
█████████████████████
dropdown_controller.js
██████ █ ██████████ █ ████ ████████████████████
██████ ███████ █████ ███████ ██████████ █
██████ ███████ █ ████████ █████████
█████████ █
█████████ █ █████
█
████████ █
Changelog
- v2.0.0: Major expansion with custom triggers, headers, dividers, icons, animations
- v1.1.0: Added ViewComponent format support
- v1.0.0: Initial release with full keyboard support
Get Full Access
Unlock the source code for this component and all others. One-time payment for lifetime access.
Get Access Now