COMPONENTS

Dropdowns

One dropdown class turns a native popover list into a standalone set of links or actions. Use it beside a button, outside the top navigation, with inherited theme styling and no JavaScript.

Usage

Markup: ul.dropdown[popover=auto] > li > a or button

Behaviour: Native outside-click/Escape dismissal; ordinary Tab navigation, not an ARIA menu. Actions and in-page links do not automatically dismiss.

  • Use a native button with type="button" and popovertarget matching the list’s unique document-wide id. Keep popover="auto" for outside-click and Escape dismissal; another unrelated auto popover closes the current one.
  • Keep ordinary list, link and button semantics. role="list" preserves list semantics when markers are removed. Do not add role="menu", role="menuitem", aria-haspopup="menu" or fixed aria-expanded: this pattern uses ordinary Tab navigation, not application-menu arrow keys.
  • The opener’s native association anchors the panel where CSS anchor positioning is supported. No wrapper or anchor-name is required. Panels can flip at viewport edges; otherwise they use a viewport-bounded centred fallback. Native popover support is required.
  • Panels inherit theme, shape, density, border and depth through their DOM parent, even in the top layer. Keep the panel inside the configured parent or .reva boundary. Shared size affects rows once; rows remain neutral rather than adopting filled button variants or animated edges.
  • Tab and Shift+Tab move through ordinary controls. Enter/Space activate buttons; Escape dismisses. Default opening and focus restoration follow native browser behaviour. An optional autofocus close button explicitly places focus inside on opening. Do not use this pattern as a modal dialog.
  • Destination links navigate normally. In-page links and arbitrary action buttons do not automatically dismiss the panel; an explicit popovertargetaction="hide" button can close it. Applications supply business actions; CSS adds no event handlers.
  • The complete, scoped and components builds include the dropdown. Modular use: tokens, base and reva.dropdowns.css; glass requires the matching optional extension. --re-dropdown-width defaults to 18rem and remains viewport-bounded. Open dropdowns are omitted from print.

Component API and styling module · Inherited appearance settings