Skip to content

2.0.0

Latest

Choose a tag to compare

@iantrich iantrich released this 19 Nov 03:20
b1953ad

Radial Menu 2.0

A ground-up rewrite on Lit 3 and TypeScript. Existing 1.6 configs keep working.

Fixed

  • Size: size: 100% now scales with the parent and stays square (#15).
  • Colors and transitions: items accept their own color, and there are new theme variables for hover color, hover background and transition (#23).
  • Dead dependency: the unmaintained mwc-ripple dependency is gone (#24). Pressed items now dim instead of rippling.
  • default_open: it works in panel views and when Home Assistant loads the card late (#26).
  • Docs: the README examples were corrected and now match real configs (#27).

New

  • Layout: start_angle and arc let a menu fan out as a half circle or any slice. size accepts any CSS length or a number of pixels.
  • Outside click: close_on_outside_click closes the menu on a click or tap anywhere outside it. It's on by default.
  • Entity state: items and the menu button with an entity now show the entity's state, such as on/off colors. icon still sets the icon, and color overrides the state color.
  • Actions: perform-action works, and so does the 1.6 service_data shape.
  • Visual editor: menu options and regular items can be edited in the dashboard editor. card: items stay YAML-only.
  • Gestures: tap, hold and double tap are reworked. Hold fires after half a second, including touch long-presses. Sliding a finger off an item cancels the press.
  • Theme variables: --radial-menu-item-hover-color, --radial-menu-item-hover-background and --radial-menu-transition.

Upgrading

  1. Centered cards: embedded card: items are now centered on their position. In 1.6 they sat about 10px right and 25px down, so cards may shift slightly.
  2. Outside click: a menu with default_open: true that should stay open now closes on an outside click. Set close_on_outside_click: false to keep the old behavior.
  3. card-mod: each card: item is wrapped in a div.custom that holds its position. CSS targeting .custom now hits the wrapper, not the card.

Known limitation

An action's confirmation uses the browser's own prompt through custom-card-helpers. The Home Assistant companion app doesn't show that prompt, so the action doesn't run there. Use a script for confirmations in the app.

Requires Home Assistant 2024.1.0 or newer.