Horizontal-stack allow for uneven spacings

I have many needs for uneven horizontal card spacings.
I would like an optional config variable for ‘Spacing’, where fractions could be put in to equal 1.

– 1/3
– 2/3

It would otherwise default to equal spacing.

Edit for clarity: An example Grafana image added below. Note how the top panel (card) spans over the panels below it. And the lower panels are uneven widths, but are still modular. There are no spacers/gaps between them.

Up until recently I used a transparent PNG to pad horizontal spacing with a picture card. Works well but my sensors are now evenly divisible so I don’t need it (well… until I add more!).

It’s actually attached below if you want it. It might be hard to see :slight_smile: Drag your mouse around then right click to download when you’ve found it.


Are you using that trick to add ‘padding’ between cards?
I want let’s say two cards, one which could be 1/3 the overall width and another which is 2/3rds the overall width.

Please vote for your own suggestion :blush:
I have been looking for the same functionality!


Ah, no. I’m using it to space horizontally stacked items in a card. Apologies for the misunderstanding.

What about using @thomasloven gap card I use it to provide blanks you can change size and height of the cards.

Gap Card

I have to try the gap-card, when home. But I suspect this card can not divide a horizontal-stack in defined sizes, like type1 use 30%, type2 use 70%, of the width(?)

It will really depend on the card sizes of those included in the stack. I use a couple of gap cards to achieve that effect and size them larger or smaller in comparison to others cards within the stack.

Correct. You’d need layout-card for that.

I have updated my OP with a Grafana image as an example. I’m a big fan of how Grafana manages the modular placement of panels. It’s very easy to build up a neat grid layout.
I know Lovelace has some ways to go, but starting with the horizontal stacks it would be nice to be able to have this modular width functionality.


really usable card. Any chance to get this into HACS for easier handling?

/ Ralf

@Ralf old posts semi-related to a card are not the place to ask for this. The best place to ask for this sort of support is in the issues section of the card Github repository. However, Thomas has said that all his cards will be added soon so in this case there is no need.
If you need to add it before then use the custom repository section in HACS settings.

1 Like

Sorry for Salinger incorrectly in this post.
But thanks for the answer!