Skip to main content
Back to changelog

Dropdown and Context menus

vortex v0.11.0: Dropdown and Context menus

DropdownMenu and ContextMenu add action menus with sections and submenus, and Accordion items can open from a click anywhere on them.

New features

  • Added DropdownMenu with DropdownMenu.Section, DropdownMenu.SectionLabel, DropdownMenu.Item and DropdownMenu.SubMenu parts. Items support icons, shortcuts and a critical tone, and submenus trap focus only when opened from the keyboard.
  • Added ContextMenu, which opens at the pointer on right-click or touch long press, and below its trigger from Shift+F10, the Menu key or the instance open method. The menu is named after its trigger by default.
  • Added clickableItems to Accordion so clicking anywhere on an item opens or closes it. Nested clickable items stay independent, and controls, links and media inside an item keep their own behavior.
  • Added padding, paddingInline, paddingBlock and borderRadius to Accordion.Item, and exposed item state through data-vortex-accordion-state and data-vortex-accordion-disabled.

Bug fixes

  • Fixed helper and error text colors in Checkbox, Radio, Slider, TextArea and TextField.
  • Fixed floating menus such as Select staying open when page scrolling clips their trigger.
  • Fixed focus traps losing focus that moved outside them when their content changed, and running pending focus recovery after cleanup.
  • Fixed anchors without href being treated as focusable.