Expander Card for HomeAssistant

April 13, 2025 · View on GitHub

GitHub tag (latest by date) GitHub all releases GitHub Repo stars

Expander/Collapsible card for HomeAssistant

Please ⭐️ or sponsor this repo if you find it useful.

Demo

Sample gif


Expand button as overlay: Sample lights overlay


You can even nest expanders!

Sample nesting


Clear Background (default theme):

Sample clear router

Options

Graphical config supported

Sample editor

Yaml:

NameTypeDefaultSupported optionsDescription
typestringRequiredcustom:expander-cardType of the card.
titlestringExpander*Title (Not displayed if using Title-Card)
clearbooleanfalsetrue|falseRemove Background
clear-childrenbooleanfalsetrue|falseRemove Backgrounds/Borders of child cards
expandedbooleanfalsetrue|falseStart expanded
expand-idstringoptionalstringUnique ID to use for JS LocalStorage. Will save expanded state
button-backgroundstringtransparentcss-colorBackground color of expand button
gapstring0.6emcss-sizegap between child cards
paddingstring1emcss-sizepadding of all card content
child-paddingstring0.5emcss-sizepadding of child cards
title-cardobjectoptionalLovelaceCardConfigReplace Title with card
title-card-paddingstring0pxcss-sizepadding of title-card
title-card-button-overlaybooleanfalsetrue|falseOverlay expand button over title-card
overlay-marginstring2emcss-sizeMargin from top right of expander button (if overlay)
cardsobject[]optionalLovelaceCardConfig[]Child cards to show when expanded

Installation

HACS

Click on the button below to add this repository to your HACS sources and open the integration in HACS automatically.

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Alternatively, you can add it manually by following the documentation here.

The link to the repository is https://github.com/Alia5/lovelace-expander-card

Manual install

1. Download the card

Install the expander-card card by copying lovelace-expander-card.js to <config directory>/www/lovelace-expander-card.js

Bash:

wget https://github.com/Alia5/lovelace-expander-card/releases/download/latest/lovelace-expander-card.js
mv lovelace-expander-card.js /config/www/
The manual way:

Link expander-card inside your ui-lovelace.yaml

resources:
  - url: /local/lovelace-expander-card.js
    type: js

Note on closing the issue tracker

FOSS is broken. People suck

I don't care anymore.