Skip to content

📱 Material Popup Card

NOTE

Available on 💎 Ultimate Version Only

✨ Overview

The Material Popup Card allows you to create modal popups in your dashboard that can contain any other lovelace card. It mimics the behavior of modern mobile app sheets, providing a smooth and integrated user experience. Trigger it via browser navigation hash changes.

☀️ Light Mode

Control Light
🌙 Dark Mode

Control Dark

✨ Key Features

  • Hash-based Trigger: Opens automatically when the URL hash matches the configured value (e.g., #popup).
  • Drag-to-Close: Supports intuitive swipe-down gestures to close the popup on mobile.
  • Backdrop Blur: Customizable backdrop blur effect for a modern aesthetic.
  • Nested Cards: Can contain any number of standard or custom lovelace cards.
  • Header Customization: Optional header with title, icon, and additional action buttons.
  • Auto-Close: Configurable timer to automatically close the popup.
  • Views Management: Supports multiple sub-views ("Pages") within the popup. Navigate between views using header buttons, enabling rich interactive interfaces. (Alpha Preview)

⚙️ Configuration

NameTypeDefaultDescription
typestringRequiredcustom:material-popup-card
hashstring#popupThe URL hash that triggers this popup to open.
cardslist[]A list of cards to display inside the popup.
viewslist[]Optional list of sub-views to display inside the popup body. (Alpha Preview)
headerobjectOptionalConfiguration for the popup header.
settingsobjectOptionalBehavior settings like auto-close and drag sensitivity.
styleobjectOptionalVisual customization options.

Header Options (header)

NameTypeDefaultDescription
show_headerbooleantrueWhether to display the header.
namestringPopupTitle text displayed in the header.
iconstringOptionalIcon displayed next to the title.
entitystringOptionalEntity to display state/toggle in the header.
button_typestringnameControls header interaction: switch, state, or name.
sub_buttonslist[]List of additional icon buttons in the header.

Settings Options (settings)

NameTypeDescription
auto_closenumberTime in milliseconds to auto-close the popup.
close_by_clicking_outsidebooleanClose the popup when clicking the backdrop.
slide_to_close_distancenumberDistance in pixels required to swipe down to close.

Style Options (style)

NameTypeDescription
width_mobilenumberWidth percentage on mobile devices.
width_desktopnumberWidth in pixels on desktop.
border_radiusnumberBorder radius of the popup card in pixels.
backdrop_blurnumberBlur amount for the backdrop in pixels.

Views Options (views) (Alpha Preview)

NameTypeDefaultDescription
view_idstringRequiredUnique ID for the view (e.g., settings).
titlestringOptionalCustom title displayed when this view is active.
iconstringOptionalCustom icon displayed when this view is active.
cardslist[]A list of cards to display inside this view.

🚀 Usage Examples

Example Configuration:

yaml
type: custom:material-popup-card
hash: "#living-room"
header:
  name: Living Room Controls
  icon: mdi:sofa
  entity: light.living_room
  button_type: switch
cards:
  - type: entities
    entities:
      - entity: light.living_room_main
      - entity: switch.tv_plug
style:
  backdrop_blur: 5
  border_radius: 24

Example Configuration with Views (Alpha Preview):

yaml
type: custom:material-popup-card
hash: "#living-room-advanced"
header:
  name: Living Room Controls
  icon: mdi:sofa
  entity: light.living_room
  button_type: switch
  sub_buttons:
    - icon: mdi:dots-vertical
      navigate_view: advanced_settings
cards:
  - type: entities
    entities:
      - entity: light.living_room_main
      - entity: switch.tv_plug
views:
  - view_id: advanced_settings
    title: Advanced Settings
    icon: mdi:cog
    cards:
      - type: entities
        entities:
          - entity: sensor.living_room_humidity
          - entity: sensor.living_room_temperature